<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss version="2.0"><channel>
 		<title><![CDATA[Spektre Design Studios | Freelance Web Design]]></title>
 		<description><![CDATA[Articles]]></description>
 		<link>http://www.spektredesign.net/</link>
 		<copyright><![CDATA[Copyright Spektre Design Studios | Freelance Web Design]]></copyright>
 		<generator>sNews CMS</generator><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/spektredesign" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
			<title><![CDATA[My trip to Bodega Bay]]></title>
			<description>
				<![CDATA[
				<p>These photos were taken when me, my brother, his wife and her brothers and mother all went on a weekend vacation to Bodega Bay. It was so beautiful there. These pictures don't even do it justice.</p>

<p><img src="/images/pictures/bodega/bodega1.jpg" alt="" /><br />From left to right: Lee, Cornelius, Mike, and Freida.<br /></p>


<p><img src="/images/pictures/bodega/bodega2.jpg" alt="" /><br /><br /></p>

<p><img src="/images/pictures/bodega/bodega3.jpg" alt="" /><br /><br /></p>

<p><img src="/images/pictures/bodega/bodega4.jpg" alt="" /><br />On the hunt for sea shells...<br /></p>


<p><img src="/images/pictures/bodega/bodega5.jpg" alt="" /><br />Me and Cornelius, standing outside a kite shop.<br /></p>


<p><img src="/images/pictures/bodega/bodega6.jpg" alt="" /><br /><br /></p>
				]]>
			</description>
			<pubDate>Sun, 21 Jun 2009 20:59:38 +0000</pubDate>
			<link>http://www.spektredesign.net/blog/my-trip-to-bodega-bay/</link>
			<guid>http://www.spektredesign.net/blog/my-trip-to-bodega-bay/</guid>
			</item><item>
			<title><![CDATA[Input focus onload]]></title>
			<description>
				<![CDATA[
				<p>Some web sites, such as big search engines, (Google, or Yahoo! for example) and other types of commercial sites often will feature a very prominent main search field. Possibly a search field on every page.</p>

<p>When this is the case, its a very good practice to make SURE the user always has their mouse cursor inside (or in focus) the main input field right from the get-go. No one wants to have to click inside a field every time they visit when its the <a href="http://www.google.com/" onclick="target='_blank';">main point of the site</a> in the first place.</p>

<p>Here's an easy way to achieve this.</p>





<p>The problem with using the above code is that you'd have to put it into each and every single &lt;input&gt; element, for every page that you wish for it to have attain focus by default. And you probably already know where I'm going with this... it's unacceptable.</p>



<p>What we will need is to create a function that will crawl the DOM looking for the first input element with a type attribute of "text" that also has no default value, and then apply focus only to it.</p> 

<p>Here's one such example.</p>


function focusInitialField() {
  var fields = document.getElementsByTagName('input');
  
  for ( var x = 0; x < fields.length; x++ ) {
    if (fields[x].getAttribute('type') == "text" && fields[x].value == "") {
    try{fields[x].focus();}
    catch(ex) {}
    break;
    }
  }
}

focusInitialField();


<p>I chose to call this function focusInitialField() but you are welcome to call it whatever you like. If you can think of a shorter, faster, or all around better solution, then by all means please share.</p>

<p>Personally, I have found it beneficial to call to it right before the closing body tag, so that it can fire right after the document finishes fully loading.</p>
				]]>
			</description>
			<pubDate>Sun, 21 Jun 2009 20:41:07 +0000</pubDate>
			<link>http://www.spektredesign.net/tutorials/javascript/input-focus-onload/</link>
			<guid>http://www.spektredesign.net/tutorials/javascript/input-focus-onload/</guid>
			</item><item>
			<title><![CDATA[Nerd vs. Geek]]></title>
			<description>
				<![CDATA[
				<p>I'd like to take this time to inform you all, that there is a difference between a Geek and a Nerd. Both terms have a distinctly different meaning, and they are not always used in a derogatory way.</p>

<blockquote>"Nerd vs. Geek": Nerds lack nearly all basic social skills except for the ability to talk incoherently about some obscure science topic. Geeks, on the other hand, have the ability to carry on a conversation like most non-nerd/geek people. If you were to release both a nerd and a geek into the wild, the nerd would seek out the other nerds already present, while the geek would mingle with the non-nerd/geek people for a while, possibly a few hours. Nerds are generally lower on the social totem pole than geeks are, you might say. So geek and nerd cannot be used interchangeably, similar to how you really cannot interchange the words swan and duck even though the two seem very similar.</blockquote>

<p>Taken from <a href="http://en.wikipedia.org/wiki/Main_Page">Wikipedia</a></p>
				]]>
			</description>
			<pubDate>Sun, 21 Jun 2009 20:30:37 +0000</pubDate>
			<link>http://www.spektredesign.net/blog/humor/nerd-vs-geek/</link>
			<guid>http://www.spektredesign.net/blog/humor/nerd-vs-geek/</guid>
			</item><item>
			<title><![CDATA[Conditional Selectors]]></title>
			<description>
				<![CDATA[
				<p>You might be thinking "Conditional?&ndash;I thought CSS was static code." Well yes, true, it <i>is</i> static. But allow me to explain.</p>

<p>According to the W3C spec, CSS is supposed to obey laws of <a href="http://www.w3.org/TR/REC-CSS2/cascade.html#specificity" onclick="target='_blank';">specificity</a>. If one selector is more <em>specific</em> than another, it will get selected before the lesser specific ones. Or, if one rule has a higher precedence than another,  it'll get selected instead of another with lower precedence (or importance). For example... </p>

<p>Lets say we wanted to have all of our &lt;h1&gt; elements to look bold, and be in the Verdana font, here is the CSS code we would use to do that:</p>



h1 {
  font-family: Verdana;
  font-weight: bold;
}


<p>BUT, what if &lt;h1&gt; is used inside the content area? (defined by &lt;div id=&quot;content&quot;&gt;) In that case, CSS will force that &lt;h1&gt; to be italic, and Arial, instead of bold/Verdana.</p>


#content h1 {
  font-family: Arial;
  font-style: italic;
  font-weight: normal;
}




<p>So now, every &lt;h1&gt; that is a child of the &lt;div id=&quot;content&quot;&gt; container will be Arial/italic, and every &lt;h1&gt; that is outside of it will be Verdana/bold. The reason is because selecting #content h1 is more specific than just selecting all h1 elements.</p>

<p>This exact same method can be used to differentiate between  any other HTML element.</p>

<h3>What if both selectors are exactly the same?</h3>


#match { color: red; }

#match { color: blue; }


<p>If two selectors conflict with one another, in that case, the latter one always wins. So in the above example, all text inside of the &lt;div id="match"&gt; container (#match) will be blue. </p>

<h3>How can I give a lower-ranked selector the highest precedence above all others?</h3>


#match { color: red !important; }

#match { color: blue; }


<p>Ordinarily in the above example text inside of #match would always be blue, but if you wish to give an out-ranked selector higher precedence, this can be done by inserting an !important rule.</p> 

<p>Occasionally, you'll need a selector which is outranked by another, to have a higher precedence in the <em>cascading order</em>. So in the above example, the #match ID would be red instead of blue, because its <em>specifically</em> designated as having higher precedence.</p>

<p>So, since style sheets cascade into one another, being familiar with the <a href="http://www.w3.org/TR/REC-CSS2/cascade.html#cascading-order" onclick="target='_blank';">cascading order</a> is a good thing. It will save you a lot of extra time and confusion. Otherwise, you may find yourself saying &quot;Why doesn't this work?&quot; an awful lot. And if you email asking me, I will point you to this article. <img src="/emot/smile.gif" alt="grin" /></p>

<p><b>Related URLs</b></p>

<ul>
<li><a href="http://www.w3.org/TR/REC-CSS2/cascade.html#inheritance">http://www.w3.org/TR/REC-CSS2/cascade.html#inheritance</a></li>
<li><a href="http://www.w3.org/TR/REC-CSS2/cascade.html#specificity">http://www.w3.org/TR/REC-CSS2/cascade.html#specificity</a></li>
<li><a href="http://www.w3.org/TR/REC-CSS2/cascade.html#cascading-order">http://www.w3.org/TR/REC-CSS2/cascade.html#cascading-order</a></li>
</ul>


				]]>
			</description>
			<pubDate>Sun, 21 Jun 2009 20:27:23 +0000</pubDate>
			<link>http://www.spektredesign.net/tutorials/css/conditional-selectors/</link>
			<guid>http://www.spektredesign.net/tutorials/css/conditional-selectors/</guid>
			</item><item>
			<title><![CDATA[Never Ask A Southern Grandma A Question]]></title>
			<description>
				<![CDATA[
				<p>Lawyers should never ask a Southern grandma a question if they aren't prepared for the answer.</p>

<p>In a trial, a Southern small-town prosecuting attorney called his first witness, a grandmotherly, elderly woman to the stand He approached her and asked, "Mrs. Jones, do you know me? </p>

<p>She responded, "Why, yes, I do know you, Mr. Williams. I've known you since you were a young boy, and frankly, you've been a big disappointment to me.  You lie, you cheat on your wife,and you manipulate people and talk about them behind their backs. You think you're a big shot when you haven't the brains to realize you never will amount to anything more than a two-bit paper pusher."</p> 



<p>"Yes, I know you." 

<p>The lawyer was stunned!  Not knowing what else to do, he pointed across the room and Asked, "Mrs. Jones, do you know the defense attorney?"</p>

<p>She again replied, "Why, yes, I do I've known
Mr. Bradley since he was a youngster, too.  He's lazy, bigoted, and he has a drinking problem. He can't build a normal relationship with anyone and his law practice is one of the worst in the entire state.</p>

<p>Not to mention that he cheated on his wife with three different women. One of them was your wife.  Yes, I know him."</p>

<p>The defense attorney almost died.  The judge asked both counselors to approach the bench and, in a very quiet voice, and said, "If either of you idiots asks her if she knows me, I'll send you both to the electric chair."</p>
				]]>
			</description>
			<pubDate>Sun, 21 Jun 2009 20:21:12 +0000</pubDate>
			<link>http://www.spektredesign.net/blog/humor/never-ask-a-southern-grandma-a-question/</link>
			<guid>http://www.spektredesign.net/blog/humor/never-ask-a-southern-grandma-a-question/</guid>
			</item></channel></rss>
