<?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 xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Van SEO Design</title>
	
	<link>http://www.vanseodesign.com/blog</link>
	<description>Helping you build search engine friendly websites</description>
	<lastBuildDate>Wed, 08 Jul 2009 18:28:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/TheVanBlog" type="application/rss+xml" /><feedburner:emailServiceId>TheVanBlog</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>How To Create a Dropdown Menu In WordPress</title>
		<link>http://feedproxy.google.com/~r/TheVanBlog/~3/VO4fzdGsGzU/</link>
		<comments>http://www.vanseodesign.com/blog/wordpress/how-to-create-a-dropdown-menu-in-wordpress/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 13:00:19 +0000</pubDate>
		<dc:creator>Steven Bradley</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.vanseodesign.com/blog/?p=728</guid>
		<description>At some point when working with WordPress you&amp;#8217;ll likely want to display your page links in a dropdown navigation bar. While there are many plugins that will do this for you, none are necessary as coding a dropdown menu in a WordPress theme is rather easy.

Below I&amp;#8217;ll show two simple ways to have WordPress create [...]&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.vanseodesign.com/blog/wordpress/how-to-create-a-dropdown-menu-in-wordpress/"&gt;How To Create a Dropdown Menu In WordPress&lt;/a&gt;&lt;/p&gt;</description>
			<content:encoded><![CDATA[<p>At some point when working with WordPress you&#8217;ll likely want to display your page links in a dropdown <a href="http://www.vanseodesign.com/blog/css/simple-navigation-bar-with-css-and-xhtml/">navigation bar</a>. While there are many <a href="http://wordpress.org/extend/plugins/tags/dropdown">plugins</a> that will do this for you, none are necessary as coding a dropdown menu in a WordPress theme is rather easy.<br />
<span id="more-728"></span><br />
Below I&#8217;ll show two simple ways to have WordPress create the html for a flexible and dynamic drop down menu in your theme. I won&#8217;t be covering the css styling in the post. If you&#8217;re unfamiliar with how to develop drop down menus in general here are two posts that will show you how.</p>
<ul>
<li><a href="http://htmldog.com/articles/suckerfish/">Sons of Suckerfish</a></li>
<li><a href="http://www.cssplay.co.uk/menus/final_drop.html">The ULTIMATE CSS only drop-down menu</a></li>
</ul>
<p>I&#8217;ve been using the Suckerfish menu for years. It&#8217;s fairly easy to understand and uses a very small JavaScript file for older version of Internet Explorer. I believe IE8 no longer needs the JavaScript, but all previous versions do. I may be wrong about it being necessary for IE7, but it&#8217;s definitely needed for IE6 and below.</p>
<p>The second link above is an example of a css only drop-down. You&#8217;ll have to view the source code to see how it&#8217;s done. I&#8217;ve never used it myself, but the author, Stu Nicholls  has tested it across many browsers and versions.</p>
<h2>Typical HTML in a Drop Down</h2>
<p>In general any time you want to create a menu or navigation bar think unordered lists in your html. For a typical dropdown menu your html might look something like the following:</p>
<pre class="html">
<span class="htmlOtherTag">&lt;ul id=<span class="htmlAttributeValue">&quot;nav&quot;</span>&gt;</span>
  <span class="htmlOtherTag">&lt;li&gt;</span><span class="htmlAnchorTag">&lt;a href=<span class="htmlAttributeValue">&quot;&quot;</span>&gt;</span><span class="htmlAnchorTag">&lt;/a&gt;</span><span class="htmlOtherTag">&lt;/li&gt;</span>
  <span class="htmlOtherTag">&lt;li&gt;</span><span class="htmlAnchorTag">&lt;a href=<span class="htmlAttributeValue">&quot;&quot;</span>&gt;</span><span class="htmlAnchorTag">&lt;/a&gt;</span>
    <span class="htmlOtherTag">&lt;ul&gt;</span>
      <span class="htmlOtherTag">&lt;li&gt;</span><span class="htmlAnchorTag">&lt;a href=<span class="htmlAttributeValue">&quot;&quot;</span>&gt;</span><span class="htmlAnchorTag">&lt;/a&gt;</span><span class="htmlOtherTag">&lt;/li&gt;</span>
      <span class="htmlOtherTag">&lt;li&gt;</span><span class="htmlAnchorTag">&lt;a href=<span class="htmlAttributeValue">&quot;&quot;</span>&gt;</span><span class="htmlAnchorTag">&lt;/a&gt;</span><span class="htmlOtherTag">&lt;/li&gt;</span>
    <span class="htmlOtherTag">&lt;/ul&gt;</span>
  <span class="htmlOtherTag">&lt;/li&gt;</span>
  <span class="htmlOtherTag">&lt;li&gt;</span><span class="htmlAnchorTag">&lt;a href=<span class="htmlAttributeValue">&quot;&quot;</span>&gt;</span><span class="htmlAnchorTag">&lt;/a&gt;</span><span class="htmlOtherTag">&lt;/li&gt;</span>
<span class="htmlOtherTag">&lt;/ul&gt;</span>
</pre>
<p>The code above is a simple nested list. Two keys to note are first that the nested list comes before the closing &lt;/li&gt; of the menu item that will contain the drop down. A common mistake is to forget to add the nested list inside the list item. The other key is we&#8217;ve given the outside &lt;ul&gt; an id so we can hook into it through our css.</p>
<p>Again I&#8217;ll point you to either of the two links above for styling a drop down menu. If you&#8217;d like me to write a post in the future showing the css and developing the full menu from scratch, leave a comment below.</p>
<h2>Creating the HTML in WordPress</h2>
<p>Editing the css file of a WordPress theme is straightforward. The hard part in creating the dropdown navigation is getting WordPress to display something close to the html above. Many people will hard code the html into their header.php file and while that works, it&#8217;s not particularly flexible. If you add a new menu item, you need to add another line of html in the appropriate place.</p>
<p>A better solution is to use a WordPress template tag to produce our html. There are two template tags that can produce the code we want. One has been around for years and one has only been with is since WordPress 2.7. Each has its advantages.</p>
<ul>
<li><a href="http://codex.wordpress.org/Template_Tags/wp_list_pages">wp_list_pages()</a></li>
<li><a href="http://codex.wordpress.org/Template_Tags/wp_page_menu">wp_page_menu()</a></li>
</ul>
<h2>Dropdowns with wp_list_pages()</h2>
<p>wp_list_pages() has been around for awhile. It outputs your pages as a series of links wrapped in list tags. Odds are your current theme uses this tag to produce your navigation. Not everyone knows how to use this tag to produce nested lists of pages, but it&#8217;s rather easy with the use of one parameter you include in the tag.</p>
<pre class="css">
&lt;ul id=<span class="cssString">"nav"</span>&gt;
  &lt;li id=<span class="cssString">"home"</span> &lt;?php if(is_page(<span class="cssString">&#039;home&#039;</span>)){echo <span class="cssString">"class=current_page_item"</span>&#59<span class="cssMedia">}</span> ?&gt;&gt;&lt;a href=<span class="cssString">"/index.php"</span>&gt;Home&lt;/a&gt;&lt;/li&gt;
  &lt;?php wp_list_pages(<span class="cssString">&#039;title_li=&amp;sort_column=menu_order&amp;depth=2&#039;</span>); ?&gt;
&lt;/ul&gt;
</pre>
<p>wp_list_pages() produces the list items, but not the &lt;ul&gt;&lt;/ul&gt; so I&#8217;ve hard coded those tags and added our id to hook into the list. The tag only lists your pages and since your home page often isn&#8217;t a WordPress page, but rather your index.php page, I&#8217;ve included a line of code to display the index.php page in the menu.</p>
<p>You&#8217;ll notice the added line also checks to see if the home page is the current page and if so it adds class=current_page_item. This class is used if you want to <a href="http://www.vanseodesign.com/blog/wordpress/hightlight-current-page-wordpress/">highlight the current page</a> or style it in some unique way. wp_list_pages() will automatically add that class to the links if creates and so it&#8217;s a good idea to add it to the home page link as well.</p>
<p>Let&#8217;s look more closely at the one remaining line of code above</p>
<pre class="css">
&lt;?php wp_list_pages(<span class="cssString">&#039;title_li=&amp;sort_column=menu_order&amp;depth=2&#039;</span>); ?&gt;
</pre>
<p>We&#8217;re passing three parameters to the wp_list_pages() tag. The first title_li is set to nothing, since we don&#8217;t want a title displayed. The second sort_column is set to menu order which will display our pages in the order we&#8217;ve specified through the admin side of WordPress. The last parameter depth is what actually creates our nested lists.</p>
<p>By default depth=1, which is why most menus in WordPress will only show our top level pages and not all your nested pages. By changing the depth to 2 WordPress will go one level deeper in producing our html and we&#8217;ll get a nested list, which we can style to be a drop-down. The code produced will look something like:</p>
<pre class="html">
<span class="htmlOtherTag">&lt;ul id=<span class="htmlAttributeValue">&quot;nav&quot;</span>&gt;</span>
  <span class="htmlOtherTag">&lt;li class=<span class="htmlAttributeValue">&#039;current_page_item&#039;</span>&gt;</span><span class="htmlAnchorTag">&lt;a href=<span class="htmlAttributeValue">&quot;&quot;</span>&gt;</span>Home<span class="htmlAnchorTag">&lt;/a&gt;</span><span class="htmlOtherTag">&lt;/li&gt;</span>
  <span class="htmlOtherTag">&lt;li class=<span class="htmlAttributeValue">&quot;page_item page-item-1&quot;</span>&gt;</span><span class="htmlAnchorTag">&lt;a href=<span class="htmlAttributeValue">&quot;&quot;</span> title=<span class="htmlAttributeValue">&quot;About&quot;</span>&gt;</span>About<span class="htmlAnchorTag">&lt;/a&gt;</span><span class="htmlOtherTag">&lt;/li&gt;</span>
    <span class="htmlOtherTag">&lt;ul&gt;</span>
      <span class="htmlOtherTag">&lt;li class=<span class="htmlAttributeValue">&quot;page_item page-item-3&quot;</span>&gt;</span><span class="htmlAnchorTag">&lt;a href=<span class="htmlAttributeValue">&quot;&quot;</span> title=<span class="htmlAttributeValue">&quot;Our Business&quot;</span>&gt;</span>Our Business<span class="htmlAnchorTag">&lt;/a&gt;</span><span class="htmlOtherTag">&lt;/li&gt;</span>
      <span class="htmlOtherTag">&lt;li class=<span class="htmlAttributeValue">&quot;page_item page-item-4&quot;</span>&gt;</span><span class="htmlAnchorTag">&lt;a href=<span class="htmlAttributeValue">&quot;&quot;</span> title=<span class="htmlAttributeValue">&quot;Our Staff&quot;</span>&gt;</span>Our Staff<span class="htmlAnchorTag">&lt;/a&gt;</span><span class="htmlOtherTag">&lt;/li&gt;</span>
    <span class="htmlOtherTag">&lt;/ul&gt;</span>
  <span class="htmlOtherTag">&lt;li class=<span class="htmlAttributeValue">&quot;page_item page-item-2&quot;</span>&gt;</span><span class="htmlAnchorTag">&lt;a href=<span class="htmlAttributeValue">&quot;&quot;</span> title=<span class="htmlAttributeValue">&quot;Contact Us&quot;</span>&gt;</span>Contact Us<span class="htmlAnchorTag">&lt;/a&gt;</span><span class="htmlOtherTag">&lt;/li&gt;</span>
<span class="htmlOtherTag">&lt;/ul&gt;</span>
</pre>
<p>The actual source of the links would be included and, of course, the menu items would be called whatever you named the pages. wp_list_pages also gives you two additional classes to hook into, page_item, and page_item-#. The important thing to note is that we now have a nested list.</p>
<p>You&#8217;re not limited to a depth of 2 either. If your pages go 3 levels deep you could have depth=3. You could go even deeper, though if you need more than 3 levels you probably need to rethink how you&#8217;ve organized your content.</p>
<h2>Dropdowns with wp_page_menu()</h2>
<p>As of WordPress 2.7 we now have the wp_page_menu() template tag, which produces essentially what we did above in a single line of code.</p>
<pre class="css">
&lt;?php wp_page_menu(<span class="cssString">&#039;title_li=&amp;sort_column=menu_order&amp;show_home=1&#039;</span>) ?&gt;
</pre>
<p>wp_page_menu() is actually a wrapper around wp_list_pages() so you can pass the same parameters as well as a few extras. One of those extras is show_home. By setting show_home to 1, we&#8217;re telling WordPress to include our home page in the menu. Setting it to 0 would tell WordPress to ignore the home page.</p>
<p>Here&#8217;s the html that gets created by the above:</p>
<pre class="html">
<span class="htmlOtherTag">&lt;div class=<span class="htmlAttributeValue">&quot;menu&quot;</span>&gt;</span>
  <span class="htmlOtherTag">&lt;ul&gt;</span>
    <span class="htmlOtherTag">&lt;li&gt;</span><span class="htmlAnchorTag">&lt;a href=<span class="htmlAttributeValue">&quot;&quot;</span>&gt;</span>Home<span class="htmlAnchorTag">&lt;/a&gt;</span><span class="htmlOtherTag">&lt;/li&gt;</span>
    <span class="htmlOtherTag">&lt;li class=<span class="htmlAttributeValue">&quot;page_item page-item-1&quot;</span>&gt;</span><span class="htmlAnchorTag">&lt;a href=<span class="htmlAttributeValue">&quot;&quot;</span> title=<span class="htmlAttributeValue">&quot;About&quot;</span>&gt;</span>About<span class="htmlAnchorTag">&lt;/a&gt;</span><span class="htmlOtherTag">&lt;/li&gt;</span>
      <span class="htmlOtherTag">&lt;ul&gt;</span>
        <span class="htmlOtherTag">&lt;li class=<span class="htmlAttributeValue">&quot;page_item page-item-3&quot;</span>&gt;</span><span class="htmlAnchorTag">&lt;a href=<span class="htmlAttributeValue">&quot;&quot;</span> title=<span class="htmlAttributeValue">&quot;Our Business&quot;</span>&gt;</span>Our Business<span class="htmlAnchorTag">&lt;/a&gt;</span><span class="htmlOtherTag">&lt;/li&gt;</span>
        <span class="htmlOtherTag">&lt;li class=<span class="htmlAttributeValue">&quot;page_item page-item-4&quot;</span>&gt;</span><span class="htmlAnchorTag">&lt;a href=<span class="htmlAttributeValue">&quot;&quot;</span> title=<span class="htmlAttributeValue">&quot;Our Staff&quot;</span>&gt;</span>Our Staff<span class="htmlAnchorTag">&lt;/a&gt;</span><span class="htmlOtherTag">&lt;/li&gt;</span>
      <span class="htmlOtherTag">&lt;/ul&gt;</span>
    <span class="htmlOtherTag">&lt;li class=<span class="htmlAttributeValue">&quot;page_item page-item-2&quot;</span>&gt;</span><span class="htmlAnchorTag">&lt;a href=<span class="htmlAttributeValue">&quot;&quot;</span> title=<span class="htmlAttributeValue">&quot;Contact Us&quot;</span>&gt;</span>Contact Us<span class="htmlAnchorTag">&lt;/a&gt;</span><span class="htmlOtherTag">&lt;/li&gt;</span>
  <span class="htmlOtherTag">&lt;/ul&gt;</span>
<span class="htmlOtherTag">&lt;/div&gt;</span>
</pre>
<p>The code is similar to what we were able to produce with wp_list_pages(), though not quite the same. You can still use it to style your dropdown, but the differences will determine which tag you prefer to use.</p>
<p>First notice that our hook (class=menu) is added to a wrapper div instead of the list itself. You can set the class name via the menu_class parameter and the fact that we&#8217;re using a class instead of an id doesn&#8217;t really affect anything. The wrapper div isn&#8217;t necessary, though it&#8217;s often used in coding drop downs. You may or may not want to include it, which would determine your choice in tags.</p>
<p>Ian Stewart has written a nice post on <a href="http://themeshaper.com/adding-class-wordpress-page-menu/">how to add a class or id to the list through a WordPress filter</a>.</p>
<p>The other major difference is that our home page doesn&#8217;t get the current_page_item class added. If you were hoping to use it to style the current page&#8217;s menu item then you may want to go with wp_list_pages() where you can add it as I did above.</p>
<p>You could also adapt Ian&#8217;s filter to add the current_page_item class. Justin Tadlock has also written a <a href="http://justintadlock.com/archives/2008/11/10/new-page-menu-function-in-wordpress-27">post on wp_page_menu</a>, including his own filter, as well as a post on <a href="http://justintadlock.com/archives/2009/04/15/how-to-widgetize-your-page-menu-in-wordpress">developing a widget for your page menu</a> using the wp_page_menu() tag</p>
<h2>Summary</h2>
<p>While I&#8217;ve spent a lot of time showing you how these two WordPress template tags work and the code they produce, it won&#8217;t take you a long time to get comfortable using them.</p>
<p>Give both a try and familiarize yourself with the codex pages for each so you can see the parameters you can use with them. Remember that any parameter you can use with <a href="http://codex.wordpress.org/Template_Tags/wp_list_pages">wp_list_pages()</a> you can also use with <a href="http://codex.wordpress.org/Template_Tags/wp_page_menu">wp_page_menu()</a>. The latter then adds a few new parameters to the mix.</p>
<p>The next time you want a dropdown menu in your theme, don&#8217;t reach for a plugin or hard code your navigation. Just look to use either of these two template tags.</p>
<p></p>
<p><a href="http://www.vanseodesign.com/blog/wordpress/how-to-create-a-dropdown-menu-in-wordpress/">How To Create a Dropdown Menu In WordPress</a></p>

<p><a href="http://feedads.g.doubleclick.net/~a/-DCj7YLKbcFrnAzSaIf5YWyEb_0/0/da"><img src="http://feedads.g.doubleclick.net/~a/-DCj7YLKbcFrnAzSaIf5YWyEb_0/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/-DCj7YLKbcFrnAzSaIf5YWyEb_0/1/da"><img src="http://feedads.g.doubleclick.net/~a/-DCj7YLKbcFrnAzSaIf5YWyEb_0/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TheVanBlog?a=VO4fzdGsGzU:91qmnD2vQBk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/TheVanBlog?i=VO4fzdGsGzU:91qmnD2vQBk:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheVanBlog?a=VO4fzdGsGzU:91qmnD2vQBk:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/TheVanBlog?i=VO4fzdGsGzU:91qmnD2vQBk:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheVanBlog?a=VO4fzdGsGzU:91qmnD2vQBk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheVanBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheVanBlog?a=VO4fzdGsGzU:91qmnD2vQBk:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/TheVanBlog?i=VO4fzdGsGzU:91qmnD2vQBk:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheVanBlog/~4/VO4fzdGsGzU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.vanseodesign.com/blog/wordpress/how-to-create-a-dropdown-menu-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		<feedburner:origLink>http://www.vanseodesign.com/blog/wordpress/how-to-create-a-dropdown-menu-in-wordpress/</feedburner:origLink></item>
		<item>
		<title>Visibility vs Display in CSS</title>
		<link>http://feedproxy.google.com/~r/TheVanBlog/~3/wFEsNh5eT5o/</link>
		<comments>http://www.vanseodesign.com/blog/css/visibility-vs-display/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 17:26:08 +0000</pubDate>
		<dc:creator>Steven Bradley</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.vanseodesign.com/blog/?p=717</guid>
		<description>You have an element in your html that you want to temporarily hide. should you change it&amp;#8217;s visibility to hidden or its display to none? Is there any difference? How will the rest of the page respond to your element that&amp;#8217;s sometimes seen and sometimes not?

The css properties visibility and display may seem to do [...]&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.vanseodesign.com/blog/css/visibility-vs-display/"&gt;Visibility vs Display in CSS&lt;/a&gt;&lt;/p&gt;</description>
			<content:encoded><![CDATA[<p>You have an element in your html that you want to temporarily hide. should you change it&#8217;s visibility to hidden or its display to none? Is there any difference? How will the rest of the page respond to your element that&#8217;s sometimes seen and sometimes not?<br />
<span id="more-717"></span><br />
The css properties visibility and display may seem to do the same thing on the surface, but they are very different and often confuse those new to web development. I thought a quick walkthrough of the main values associated with each property along with a demo of each in action would help remove that confusion.</p>
<h2>Visibility and Display Properties in Action</h2>
<p>Here&#8217;s a simple <a href="http://www.vanseodesign.com/blog/demo/display-visibility.html">demo of visibility and display in action</a> that will open in a new window. Click the two links at the top to toggle the visibility and the display to see how each affects the other elements on the page. I&#8217;ll explain what&#8217;s going on with each property below.</p>
<h2>How the CSS Visibility Property Works</h2>
<p>The <a href="http://www.w3schools.com/CSS/pr_class_visibility.asp">visibility property</a> has four values associated with it, but let&#8217;s focus on the two used most often, visible and hidden.</p>
<p>From W3Schools</p>
<pre class="css">
visibility: visible
The element is visible. This is default
visibility: hidden
The element is invisible (but still takes up space)
</pre>
<p>Both values are rather straightforward and behave exactly as you think. You see elements that are visible and don&#8217;t see elements that are hidden. That important point to note is that when hidden the element still takes up space.</p>
<h2>How the CSS Display Property Works</h2>
<p>The <a href="http://www.w3schools.com/css/pr_class_display.asp">display property</a> has quite a few values associated with it, but again let&#8217;s focus on a smaller subset. The two values that concern us here are block and none, but I want to quickly mention the inline value too.</p>
<p>Again from W3Schools</p>
<pre class="css">
display: none
The element will generate no box at all
display: block
The element will generate a block box
(a line break before and after the element)
display: inline
The element will generate an inline box
(no line break before or after the element)
</pre>
<p>On the surface display: none might seem to be the same is visibility: hidden, but it isn&#8217;t. The big difference is in that point I called out above.</p>
<p><em>visibility: hidden</em> &#8211; the element stays in the normal document flow</p>
<p><em>display: none</em> &#8211; the element is removed from normal document flow so surrounding html elements collapse to close the space</p>
<p>Elements set to display as block or inline both fill a space. The difference being that block elements have line breaks around them  and inline elements don&#8217;t. Some elements are block elements by default and some are inline elements.</p>
<h2>When  Should You Use Visibility and When Should You Use Display?</h2>
<p>While both can be used to &#8220;hide&#8221; an element each does so in a different way. Again that difference is in how each responds to the normal document flow.</p>
<p>You want to use visibility when you want the element to hold its space even when it&#8217;s not seen. You want to use display when you want the element to give back its space allowing the other elements on your page to collapse around it.</p>
<p>In practice I tend to use display more than visibility. Usually when you want an element not to show you don&#8217;t want to leave an empty space in its place. You do need to understand that other html elements will move to fill the now unoccupied space and develop your layout accordingly.</p>
<h2>SEO Effects of Visibility and Display</h2>
<p>A sometimes used spam tactic is to stuff keywords on a page and make them invisible in some way. Often this is done not through either of the css properties above, but rather by giving the text the same color as the background it sits on or making the font so small as to render it invisible.</p>
<p>Because these tactics are frowned up by search engines, some people worry about using either the visibility or the display property to &#8220;hide&#8221; html.</p>
<p>There are many good reasons why you want some elements in your design to sometimes be seen and sometimes not be seen and search engines understand that. As long as you aren&#8217;t trying to trick search engines in any way you shouldn&#8217;t encounter any problems using either visibility or block to show and hide an element. </p>
<p></p>
<p><a href="http://www.vanseodesign.com/blog/css/visibility-vs-display/">Visibility vs Display in CSS</a></p>

<p><a href="http://feedads.g.doubleclick.net/~a/8EdSNcqqUCghiTleFhQtU5OiI7w/0/da"><img src="http://feedads.g.doubleclick.net/~a/8EdSNcqqUCghiTleFhQtU5OiI7w/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/8EdSNcqqUCghiTleFhQtU5OiI7w/1/da"><img src="http://feedads.g.doubleclick.net/~a/8EdSNcqqUCghiTleFhQtU5OiI7w/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TheVanBlog?a=wFEsNh5eT5o:ON_eri8dgnk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/TheVanBlog?i=wFEsNh5eT5o:ON_eri8dgnk:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheVanBlog?a=wFEsNh5eT5o:ON_eri8dgnk:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/TheVanBlog?i=wFEsNh5eT5o:ON_eri8dgnk:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheVanBlog?a=wFEsNh5eT5o:ON_eri8dgnk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheVanBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheVanBlog?a=wFEsNh5eT5o:ON_eri8dgnk:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/TheVanBlog?i=wFEsNh5eT5o:ON_eri8dgnk:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheVanBlog/~4/wFEsNh5eT5o" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.vanseodesign.com/blog/css/visibility-vs-display/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.vanseodesign.com/blog/css/visibility-vs-display/</feedburner:origLink></item>
		<item>
		<title>How To Create Stylish Navigation Buttons With CSS</title>
		<link>http://feedproxy.google.com/~r/TheVanBlog/~3/DcX2E47ixDU/</link>
		<comments>http://www.vanseodesign.com/blog/css/css-navigation-buttons/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 20:52:58 +0000</pubDate>
		<dc:creator>Steven Bradley</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.vanseodesign.com/blog/?p=705</guid>
		<description>Most of the time when designing your site navigation you&amp;#8217;ll turn to an image to give it that something extra. However images add weight to a web page and make additional http requests leading to longer load times. Ever since I began developing websites, I&amp;#8217;ve looked for ways to replace images with code. Today I [...]&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.vanseodesign.com/blog/css/css-navigation-buttons/"&gt;How To Create Stylish Navigation Buttons With CSS&lt;/a&gt;&lt;/p&gt;</description>
			<content:encoded><![CDATA[<p>Most of the time when designing your site navigation you&#8217;ll turn to an image to give it that something extra. However images add weight to a web page and make additional http requests leading to longer load times. Ever since I began developing websites, I&#8217;ve looked for ways to replace images with code. Today I want to share a simple way to style navigation buttons sans images and using css only.<br />
<span id="more-705"></span><br />
<strong>Note:</strong> If you decide not to use the technique below and prefer to use images for your nav buttons I suggest using css sprites. If you&#8217;re unfamiliar with css sprites have a look at these posts to learn how to use them.</p>
<ul>
<li><a href="http://www.smashingmagazine.com/2009/04/27/the-mystery-of-css-sprites-techniques-tools-and-tutorials/">The Mystery Of CSS Sprites: Techniques, Tools And Tutorials</a></li>
<li><a href="http://www.alistapart.com/articles/sprites/">CSS Sprites: Image Slicing’s Kiss of Death</a></li>
<li><a href="http://www.alistapart.com/articles/sprites2/">CSS Sprites2 &#8211; It’s JavaScript Time</a></li>
</ul>
<h2>Final Navigation Bar Preview</h2>
<p>Before we begin let&#8217;s take a look at where we&#8217;re going. Here&#8217;s an image of what our final navigation bar will look like as well as an image of how it will look when mousing over one of the buttons.</p>
<p>And here&#8217;s a <a href="http://vanseodesign.com/blog/demo/css-nav-bar.html" target="_blank">demo of the navigation bar</a> that will open in a new window.</p>
<div class="centered"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2009/06/nav-bar.png" alt="nav-bar.png" border="0" width="465" height="77" /></div>
<div class="centered"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2009/06/nav-bar-over.png" alt="nav-bar-over.png" border="0" width="465" height="77" /></div>
<p>Even without using images the nav bar above has a 3D feel to it and gives the impression that the buttons can being pressed or clicked.</p>
<p>I won&#8217;t be going over all the code used to create the navigation bar in this post as I&#8217;ve covered most of it before in my <a href="http://www.vanseodesign.com/blog/css/simple-navigation-bar-with-css-and-xhtml/">simple navigation bar</a> post. What I want to show you today is the part that gives the button the 3D effect, though I&#8217;ll provide all the code to create the nav bar at the bottom of this post.</p>
<h2>CSS Borders to Give any Element Depth</h2>
<p>The trick to the 3D effect, as you can guess from the heading above, is to use <a href="http://www.vanseodesign.com/blog/css/creating-shapes-with-css-borders/">css borders</a> to convey a sense of depth from an imaginary light source. There are 3 simple parts to this technique.</p>
<ul>
<li>decide where your light source is</li>
<li>give sides where light shines a border a shade or two lighter than the button color</li>
<li>give sides that would be in shadows a border a shade or two  darker than the button color</li>
</ul>
<p>Let&#8217;s illustrate the three steps above using a grayscale version of our navigation bar to make the color changes easier.</p>
<div class="centered"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2009/06/nav-bar-gray.png" alt="nav-bar-gray.png" border="0" width="465" height="77" /></div>
<div class="centered"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2009/06/nav-bar-gray-over.png" alt="nav-bar-gray-over.png" border="0" width="465" height="77" /></div>
<p>I&#8217;ve used #555555 as the color for the grayscale buttons above and we&#8217;re assuming our light source is shining from the upper left. That means the top and left sides of the button should appear lighter while the right and bottom sides will be darker.</p>
<p>#555555 is the hexidecimal representation of a medium gray. To make the color darker we want to lower the numbers toward 0 and to make it lighter we want to increase the number toward F. Here&#8217;s the border code I used to create the effect.</p>
<pre class="css">
<span class="cssProperty">border-top</span><span class="cssRest">:</span><span class="cssValue">2px solid #777777</span><span class="cssRest">;</span>
<span class="cssProperty">border-right</span><span class="cssRest">:</span><span class="cssValue">2px solid #333333</span><span class="cssRest">;</span>
<span class="cssProperty">border-bottom</span><span class="cssRest">:</span><span class="cssValue">2px solid #444444</span><span class="cssRest">;</span>
<span class="cssProperty">border-left</span><span class="cssRest">:</span><span class="cssValue">2px solid #777777</span><span class="cssRest">;</span>
</pre>
<p>I&#8217;ve used a 2px border for each side and for the top and left sides used a color of #777777 or two shades lighter than the button color #555555. The right side gets a color two shades darker at #333333 and the bottom I only went one shade darker with #444444.</p>
<p>In practice you might only use a 1px border, but I used 2px here to make the effect more obvious. Also I&#8217;ll tend to play around a little with the colors until I get something I like, though I usually start by making all the hex values one or two numbers darker or lighter.</p>
<p>With the rollover button the process is similar except that now the top and left sides will be darker and the right and bottom sides will be lighter. Here I used a color of #999999 for the button itself and then for the borders the code is as follows.</p>
<pre class="css">
<span class="cssProperty">border-top</span><span class="cssRest">:</span><span class="cssValue">2px solid #777777</span><span class="cssRest">;</span>
<span class="cssProperty">border-right</span><span class="cssRest">:</span><span class="cssValue">2px solid #aaaaaa</span><span class="cssRest">;</span>
<span class="cssProperty">border-bottom</span><span class="cssRest">:</span><span class="cssValue">2px solid #aaaaaa</span><span class="cssRest">;</span>
<span class="cssProperty">border-left</span><span class="cssRest">:</span><span class="cssValue">2px solid #777777</span><span class="cssRest">;</span>
</pre>
<p>Again it&#8217;s the same as before except for the darker and lighter sides being reversed.</p>
<h2>Extending the CSS Border Technique</h2>
<p>The technique above is very simple, but there&#8217;s no reason you can&#8217;t extend it some for more creative possibilities. You can try altering the width of the different borders or play around with the colors to make it look like the light has been cast through a filter. Instead of changing all 6 hex digits you could raise or lower only the red or green values while keeping the blue constant.</p>
<p>One thing I&#8217;ll sometimes do is not change the top and bottom border colors on the rollover. That will give the impression that when pressed in the button sits at the same level as the surrounding page, instead of feeling slightly depressed from the page as shown here.</p>
<p>This technique is also hardly limited to navigation buttons. You can use it on any element that accepts a css border. You could for example set up a class for all your buy now buttons using this technique and then apply that class wherever you want a buy now button across your site.</p>
<p>Hopefully in the not too distant future when all browsers can handle things like <a href="http://www.webdesignerwall.com/tutorials/css-gradient-text-effect/">css gradients</a>  and <a href="http://www.zenelements.co.uk/blog/css3-border-radius-rounded-corners/">border radius</a> you&#8217;ll be able to style the button with code only and eliminate the need to ever use an image for a button. For now you can use either as part of <a href="http://www.alistapart.com/articles/understandingprogressiveenhancement/">progressive enhancement</a> on your site.</p>
<h2>Code Used to Create the Navigation Bar</h2>
<p>As promised here&#8217;s all the code I used to create the navigation bar at the top of the page. The #nav-wrapper code is there just to have a color that shows what&#8217;s going on better than the white of the page. It&#8217;s presented here, but not necessary.</p>
<h3>The HTML</h3>
<pre class="html">
<span class="htmlOtherTag">&lt;div id=<span class="htmlAttributeValue">&quot;nav-wrapper&quot;</span>&gt;</span>
  <span class="htmlOtherTag">&lt;ul id=<span class="htmlAttributeValue">&quot;nav&quot;</span>&gt;</span>
    <span class="htmlOtherTag">&lt;li&gt;</span><span class="htmlAnchorTag">&lt;a href=<span class="htmlAttributeValue">&quot;&quot;</span>&gt;</span>Home<span class="htmlAnchorTag">&lt;/a&gt;</span><span class="htmlOtherTag">&lt;/li&gt;</span>
    <span class="htmlOtherTag">&lt;li&gt;</span><span class="htmlAnchorTag">&lt;a href=<span class="htmlAttributeValue">&quot;&quot;</span>&gt;</span>About<span class="htmlAnchorTag">&lt;/a&gt;</span><span class="htmlOtherTag">&lt;/li&gt;</span>
    <span class="htmlOtherTag">&lt;li&gt;</span><span class="htmlAnchorTag">&lt;a href=<span class="htmlAttributeValue">&quot;&quot;</span>&gt;</span>Services<span class="htmlAnchorTag">&lt;/a&gt;</span><span class="htmlOtherTag">&lt;/li&gt;</span>
    <span class="htmlOtherTag">&lt;li&gt;</span><span class="htmlAnchorTag">&lt;a href=<span class="htmlAttributeValue">&quot;&quot;</span>&gt;</span>FAQ<span class="htmlAnchorTag">&lt;/a&gt;</span><span class="htmlOtherTag">&lt;/li&gt;</span>
    <span class="htmlOtherTag">&lt;li&gt;</span><span class="htmlAnchorTag">&lt;a href=<span class="htmlAttributeValue">&quot;&quot;</span>&gt;</span>Contact<span class="htmlAnchorTag">&lt;/a&gt;</span><span class="htmlOtherTag">&lt;/li&gt;</span>
  <span class="htmlOtherTag">&lt;/ul&gt;</span>
<span class="htmlOtherTag">&lt;/div&gt;</span>
</pre>
<h3>The CSS</h3>
<pre class="css">
<span class="cssSelector">#nav-wrapper {</span>
<span class="cssProperty">width</span><span class="cssRest">:</span><span class="cssValue">465px</span><span class="cssRest">;</span>
<span class="cssProperty">margin</span><span class="cssRest">:</span><span class="cssValue">0 auto</span><span class="cssRest">;</span>
<span class="cssProperty">padding</span><span class="cssRest">:</span><span class="cssValue">20px 0</span><span class="cssRest">;</span>
<span class="cssProperty">background</span><span class="cssRest">:</span><span class="cssValue">#3D3331</span><span class="cssRest">;</span>
<span class="cssSelector">}</span>
<span class="cssSelector">ul#nav {</span>
<span class="cssProperty">font-family</span><span class="cssRest">:</span><span class="cssValue"> Verdana</span><span class="cssRest">;</span>
<span class="cssProperty">font-size</span><span class="cssRest">:</span><span class="cssValue">14px</span><span class="cssRest">;</span>
<span class="cssProperty">list-style</span><span class="cssRest">:</span><span class="cssValue">none</span><span class="cssRest">;</span>
<span class="cssProperty">margin</span><span class="cssRest">:</span><span class="cssValue">0 auto</span><span class="cssRest">;</span>
padding:0;
<span class="cssProperty">width</span><span class="cssRest">:</span><span class="cssValue">455px</span><span class="cssRest">;</span>
<span class="cssProperty">overflow</span><span class="cssRest">:</span><span class="cssValue"> auto</span><span class="cssRest">;</span>
<span class="cssSelector">}</span>
<span class="cssSelector">ul#nav li {</span>
<span class="cssProperty">display</span><span class="cssRest">:</span><span class="cssValue">inline</span><span class="cssRest">;</span>
<span class="cssSelector">}</span>
<span class="cssSelector">ul#nav li a {</span>
<span class="cssProperty">text-decoration</span><span class="cssRest">:</span><span class="cssValue">none</span><span class="cssRest">;</span>
<span class="cssProperty">display</span><span class="cssRest">:</span><span class="cssValue"> block</span><span class="cssRest">;</span>
<span class="cssProperty">padding</span><span class="cssRest">:</span><span class="cssValue">5px 21px</span><span class="cssRest">;</span>
<span class="cssProperty">background</span><span class="cssRest">:</span><span class="cssValue">#5F3222</span><span class="cssRest">;</span>
<span class="cssProperty">color</span><span class="cssRest">:</span><span class="cssValue">#eee</span><span class="cssRest">;</span>
<span class="cssProperty">float</span><span class="cssRest">:</span><span class="cssValue">left</span><span class="cssRest">;</span>
<span class="cssProperty">text-align</span><span class="cssRest">:</span><span class="cssValue">center</span><span class="cssRest">;</span>
<span class="cssProperty">border-top</span><span class="cssRest">:</span><span class="cssValue">2px solid #815444</span><span class="cssRest">;</span>
<span class="cssProperty">border-right</span><span class="cssRest">:</span><span class="cssValue">2px solid #3d1000</span><span class="cssRest">;</span>
<span class="cssProperty">border-bottom</span><span class="cssRest">:</span><span class="cssValue">2px solid #3d1000</span><span class="cssRest">;</span>
<span class="cssProperty">border-left</span><span class="cssRest">:</span><span class="cssValue">2px solid #815444</span><span class="cssRest">;</span>
<span class="cssSelector">}</span>
<span class="cssSelector">ul#nav li a:hover {</span>
<span class="cssProperty">background</span><span class="cssRest">:</span><span class="cssValue">#a37666</span><span class="cssRest">;</span>
<span class="cssProperty">color</span><span class="cssRest">:</span><span class="cssValue">#000</span><span class="cssRest">;</span>
<span class="cssProperty">border-top</span><span class="cssRest">:</span><span class="cssValue">2px solid #815444</span><span class="cssRest">;</span>
<span class="cssProperty">border-right</span><span class="cssRest">:</span><span class="cssValue">2px solid #c59888</span><span class="cssRest">;</span>
<span class="cssProperty">border-bottom</span><span class="cssRest">:</span><span class="cssValue">2px solid #c59888</span><span class="cssRest">;</span>
<span class="cssProperty">border-left</span><span class="cssRest">:</span><span class="cssValue">2px solid #815444</span><span class="cssRest">;</span>
<span class="cssSelector">}</span>
</pre>
<p>Any tricks you&#8217;ve developed to replace images with code?</p>
<p></p>
<p><a href="http://www.vanseodesign.com/blog/css/css-navigation-buttons/">How To Create Stylish Navigation Buttons With CSS</a></p>

<p><a href="http://feedads.g.doubleclick.net/~a/V_YNi7LfvjDJvIuHjFa_CS-tsx4/0/da"><img src="http://feedads.g.doubleclick.net/~a/V_YNi7LfvjDJvIuHjFa_CS-tsx4/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/V_YNi7LfvjDJvIuHjFa_CS-tsx4/1/da"><img src="http://feedads.g.doubleclick.net/~a/V_YNi7LfvjDJvIuHjFa_CS-tsx4/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TheVanBlog?a=DcX2E47ixDU:5L9bG3Xhsyo:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/TheVanBlog?i=DcX2E47ixDU:5L9bG3Xhsyo:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheVanBlog?a=DcX2E47ixDU:5L9bG3Xhsyo:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/TheVanBlog?i=DcX2E47ixDU:5L9bG3Xhsyo:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheVanBlog?a=DcX2E47ixDU:5L9bG3Xhsyo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheVanBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheVanBlog?a=DcX2E47ixDU:5L9bG3Xhsyo:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/TheVanBlog?i=DcX2E47ixDU:5L9bG3Xhsyo:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheVanBlog/~4/DcX2E47ixDU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.vanseodesign.com/blog/css/css-navigation-buttons/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		<feedburner:origLink>http://www.vanseodesign.com/blog/css/css-navigation-buttons/</feedburner:origLink></item>
		<item>
		<title>4 Common But Not-So-Visible SEO Mistakes</title>
		<link>http://feedproxy.google.com/~r/TheVanBlog/~3/i9I6nWg8tt4/</link>
		<comments>http://www.vanseodesign.com/blog/seo/4-common-seo-mistakes/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 17:52:21 +0000</pubDate>
		<dc:creator>Steven Bradley</dc:creator>
				<category><![CDATA[SEO]]></category>

		<guid isPermaLink="false">http://www.vanseodesign.com/blog/?p=695</guid>
		<description>The following guest post is from Nicole White from Web Design Schools Guide.
If you own a website, you know that SEO is an inherent part of the design process, a very important part that determines your position in the search engine rankings and one that can make or break your success on the Internet.

 photo [...]&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.vanseodesign.com/blog/seo/4-common-seo-mistakes/"&gt;4 Common But Not-So-Visible SEO Mistakes&lt;/a&gt;&lt;/p&gt;</description>
			<content:encoded><![CDATA[<p>The following guest post is from Nicole White from <a href="http://www.webdesignschoolsguide.com/">Web Design Schools Guide</a>.</p>
<p>If you own a website, you know that SEO is an inherent part of the design process, a very important part that determines your position in the search engine rankings and one that can make or break your success on the Internet.<br />
<span id="more-695"></span><br />
<a href="http://www.flickr.com/photos/96526303@N00/3515454085/" title="(122/365) Invisible" target="_blank"><img src="http://farm4.static.flickr.com/3636/3515454085_b7de57c305_m.jpg" alt="(122/365) Invisible" border="0" width="465" height="473" /></a><br /><small><a href="http://creativecommons.org/licenses/by/2.0/" title="Attribution License" target="_blank"><img src="http://www.vanseodesign.com/blog/wp-content/plugins/photo-dropper/images/cc.png" alt="Creative Commons License" border="0" width="16" height="16" align="absmiddle" /></a> <a href="http://www.photodropper.com/photos/" target="_blank">photo</a> credit: <a href="http://www.flickr.com/photos/96526303@N00/3515454085/" title="Sarah G..." target="_blank">Sarah G&#8230;</a></small></p>
<p>Everyone knows that keywords are important when you’re thinking SEO, but most people are not aware that SEO is much more than just interspersing your text with the right keywords. If your site is not doing as well as you expected it to, perhaps you’ve been guilty of one or more of these SEO sins, mistakes that could be the reason you’re not getting as much traffic as you would like:</p>
<ul>
<li><strong>SEO not being a part of your plan:</strong> As far as SEO is concerned, it <a href="http://www.vanseodesign.com/blog/seo/when-to-start-seo-on-your-site/">must be a part of your initial plan</a>, rather than an afterthought, when you’re adding the text portions of your website.
<p>If you include optimization for a search engine as part of your entire process, you’ll probably bring in someone who is an expert to tell you what you need to do in order to push your rankings higher. Make sure you stay in tune with what your SEO expert is doing so that your design processes are not disconnected from each other.</li>
<li><strong>Maintenance taking your site out of contention:</strong> Not many of us realize this, but if your site is down when you’re performing maintenance work (as you must do sometimes), you risk being taken off the search engine rankings if a search engine spider comes looking your way when there’s a blank page at your regular URL.
<p>In order to avoid this situation and its consequences, set up a mirror site where users are redirected when you’re down for maintenance.</li>
</ul>
<p><strong>Note from Steve:</strong>  Search engines do understand that <a href="http://www.vanseodesign.com/blog/whatever/jammed-finger-hacked-sites-and-a-new-twitter-client/">problems happen on sites and servers</a>. Every site goes down at times whether for maintenance or an issue with the site hosting. You shouldn&#8217;t lose ranking for a temporary downtime, however if your site remains down for days or weeks, search engines might conclude your site no longer exists.</p>
<ul>
<li><strong>Content not being updated in a while:</strong> No matter how popular your site is, if you neglect it for a while, it is going to climb down the ranking ladder sooner than you realize.
<p>You must <a href="http://www.vanseodesign.com/blog/seo/more-content-more-traffic-more-sales/">update it regularly, with content</a> that is of quality and that helps keep you in the spotlight. If you do not have time to devote for regular updates, outsource the operation.</li>
<li><strong>Finishing with SEO:</strong> No matter how much time you devote to SEO, it is a never-ending process, one that must be performed continuously and constantly. This is because the Internet is a medium that changes at a rapid pace, and unless you are able to keep up, you are definitely going to be left out.</li>
</ul>
<p>Nicole White writes about online web design school. She welcomes your feedback at Nicole.White222 [at] gmail.com </p>
<p></p>
<p><a href="http://www.vanseodesign.com/blog/seo/4-common-seo-mistakes/">4 Common But Not-So-Visible SEO Mistakes</a></p>

<p><a href="http://feedads.g.doubleclick.net/~a/J7CaBwd1ogJVM4p00Nyj2OBDcf4/0/da"><img src="http://feedads.g.doubleclick.net/~a/J7CaBwd1ogJVM4p00Nyj2OBDcf4/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/J7CaBwd1ogJVM4p00Nyj2OBDcf4/1/da"><img src="http://feedads.g.doubleclick.net/~a/J7CaBwd1ogJVM4p00Nyj2OBDcf4/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TheVanBlog?a=i9I6nWg8tt4:_3CUcFWzhpI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/TheVanBlog?i=i9I6nWg8tt4:_3CUcFWzhpI:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheVanBlog?a=i9I6nWg8tt4:_3CUcFWzhpI:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/TheVanBlog?i=i9I6nWg8tt4:_3CUcFWzhpI:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheVanBlog?a=i9I6nWg8tt4:_3CUcFWzhpI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheVanBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheVanBlog?a=i9I6nWg8tt4:_3CUcFWzhpI:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/TheVanBlog?i=i9I6nWg8tt4:_3CUcFWzhpI:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheVanBlog/~4/i9I6nWg8tt4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.vanseodesign.com/blog/seo/4-common-seo-mistakes/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.vanseodesign.com/blog/seo/4-common-seo-mistakes/</feedburner:origLink></item>
		<item>
		<title>Understanding Style Precedence in CSS: Specificity, Inheritance, and the Cascade</title>
		<link>http://feedproxy.google.com/~r/TheVanBlog/~3/v5Vw30iWmzU/</link>
		<comments>http://www.vanseodesign.com/blog/css/css-specificity-inheritance-cascaade/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 18:20:47 +0000</pubDate>
		<dc:creator>Steven Bradley</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.vanseodesign.com/blog/?p=686</guid>
		<description>Have you ever run into the situation where you&amp;#8217;re trying to apply a css style to an element, but it won&amp;#8217;t take? Your page it seems to be ignoring your css, but you can&amp;#8217;t figure out why. Maybe you found yourself using !important or adding an inline style as a last resort. There&amp;#8217;s a good [...]&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.vanseodesign.com/blog/css/css-specificity-inheritance-cascaade/"&gt;Understanding Style Precedence in CSS: Specificity, Inheritance, and the Cascade&lt;/a&gt;&lt;/p&gt;</description>
			<content:encoded><![CDATA[<p>Have you ever run into the situation where you&#8217;re trying to apply a css style to an element, but it won&#8217;t take? Your page it seems to be ignoring your css, but you can&#8217;t figure out why. Maybe you found yourself using !important or adding an inline style as a last resort. There&#8217;s a good chance the problem you encountered was one of <a href="http://www.w3.org/TR/CSS2/cascade.html">css precedence</a>.<br />
<span id="more-686"></span><br />
A better understanding of which css styles take precedence can lead to less frustration with css, cleaner code, and <a href="http://www.vanseodesign.com/blog/css/how-to-organize-css-files/">more organized css</a> so let&#8217;s look at three things that control which css rule applies to a given html element:</p>
<ul>
<li>Specificity Calculations</li>
<li>Inheritance</li>
<li>The Cascade</li>
</ul>
<p>Learning these rules will take you to the next level in your <a href="http://www.vanseodesign.com/blog/css/my-development-with-css/">css development</a>.</p>
<h2>Specificity Calculations</h2>
<p>Imagine your html contains a paragraph with a class of &#8220;bio&#8221; applied to it. You also have the following two css rules:</p>
<pre class="css">
<span class="cssSelector">p {</span>font-size: 12px<span class="cssSelector">}</span>
<span class="cssSelector">p.bio {</span>font-size: 14px<span class="cssSelector">}</span>
</pre>
<p>Would you expect the text in your paragraph to be 12px or 14px? You can probably guess in this case it will be 14px. The second line of css (p.bio) is more specific than the first when it comes to your class=&#8221;bio&#8221; paragraph. However, sometimes the specificity isn&#8217;t so easy to see.</p>
<p>For example consider the following html and css</p>
<pre class="html">
<span class="htmlOtherTag">&lt;div id=<span class="htmlAttributeValue">&quot;sidebar&quot;</span>&gt;</span>
<span class="htmlOtherTag">&lt;p class=<span class="htmlAttributeValue">&quot;bio&quot;</span>&gt;</span>text here<span class="htmlOtherTag">&lt;/p&gt;</span>
<span class="htmlOtherTag">&lt;/div&gt;</span>
</pre>
<pre class="css">
<span class="cssSelector">div p.bio {</span>font-size: 14px<span class="cssSelector">}</span>
<span class="cssSelector">#sidebar p {</span>font-size: 12px<span class="cssSelector">}</span>
</pre>
<p>The first line of css might seem more specific at first glance, but it&#8217;s actually the second line above that would be more specific to the font-size of your paragraph. Why is that?</p>
<p>To answer the question we need to consider the rules of specificity.</p>
<p>Specificity is calculated by counting various components of your css and expressing them in a form (a,b,c,d). This will be clearer with an example, but first the components.</p>
<ul>
<li>Element, Pseudo Element: d = 1 &#8211; (0,0,0,1)</li>
<li>Class, Pseudo class, Attribute: c = 1 &#8211; (0,0,1,0)</li>
<li>Id: b = 1 &#8211; (0,1,0,0)</li>
<li>Inline Style: a = 1 &#8211; (1,0,0,0)</li>
</ul>
<p>An id is more specific than a class is more specific than an element.</p>
<p>You calculate specificity by counting each of the above and adding 1 to either a,b,c, or d. It&#8217;s also important to note that 0,0,1,0 is more specific than 0,0,0,15. Let&#8217;s look at some examples to make the calculation clearer.</p>
<ul>
<li>p: 1 element &#8211; (0,0,0,1)</li>
<li>div: 1 element &#8211; (0,0,0,1)</li>
<li>#sidebar: 1 id &#8211; (0,1,0,0)</li>
<li>div#sidebar: 1 element, 1 id &#8211; (0,1,0,1)</li>
<li>div#sidebar p: 2 elements, 1 id &#8211; (0,1,0,2)</li>
<li>div#sidebar p.bio: 2 elements, 1 class, 1 id &#8211; (0,1,1,2)</li>
</ul>
<p>Let&#8217;s look again at the example above</p>
<pre class="css">
<span class="cssSelector">div p.bio {</span>font-size: 14px<span class="cssSelector">}</span> - (0,0,1,2)
<span class="cssSelector">#sidebar p {</span>font-size: 12px<span class="cssSelector">}</span> - (0,1,0,1)
</pre>
<p>The second has the higher specificity and thus takes precedence.</p>
<p>One last point before we move on. Importance trumps specificity, When you mark a css property with !important you&#8217;re overriding specificity rules and so</p>
<pre class="css">
<span class="cssSelector">div p.bio {</span>font-size: 14px <span class="cssImportant">!important</span><span class="cssSelector">}</span>
<span class="cssSelector">#sidebar p {</span>font-size: 12px<span class="cssSelector">}</span>
</pre>
<p>means the first line of css above takes precedence instead of the second. !important is still mostly a hack around the basic rules and is something you should never need if you understand how the rules work.</p>
<h2>Inheritance</h2>
<p>The idea behind inheritance is relatively easy to understand. Elements inherit styles from their parent container. If you set the body tag to use color: red then the text for all elements inside the body will also be red unless otherwise specified.</p>
<p>Not all css properties are inherited, though. For example margins and paddings  are non-inherited properties. If you set a margin or padding on a div, the paragraphs inside that div do not inherit the margin and padding you set on the div. The paragraph will use the default browser margin and padding until you declare otherwise.</p>
<p>You can explicitly set a property to inherit styles from it&#8217;s parent container, though. For example you could declare</p>
<pre class="css">
<span class="cssSelector">p {</span><span class="cssProperty">margin</span><span class="cssRest">:</span><span class="cssValue"> inherit</span><span class="cssRest">;</span> padding: inherit<span class="cssSelector">}</span>
</pre>
<p>and your paragraph would then inherit both from it&#8217;s containing element.</p>
<h2>The Cascade</h2>
<p>At the highest level the cascade is what controls all css precedence and works as follows.</p>
<ol>
<li>Find all css declarations that apply to the element and property in question.</li>
<li>Sort by origin and weight. Origin refers to the source of the declaration (author styles, user styles, browser defaults) and weight refers to the importance of the declaration. (author has more weight than user which has more weight than default. !importance has more weight than normal declarations) </li>
<li>Calculate specificity</li>
<li>If two rules are equal in all of the above, the one declared last wins. CSS embedded in the html always come after external stylesheets regardless of the order in the html</li>
</ol>
<p>#3 above is likely the one you&#8217;ll need to pay attention to most. With #2 just understand that your styles will override how a user sets their browser unless they set their rules to be important.</p>
<p>Also realize that your styles will override the browser defaults, but those defaults do exist and is often what leads to cross browser issues. Using a reset file like <a href="http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/">Eric Meyer&#8217;s CSS Reset</a> or <a href="http://developer.yahoo.com/yui/reset/">Yahoo&#8217;s YUI Reset CSS</a> helps take the default styles out of the equation.</p>
<h2>Summary</h2>
<p>Hopefully the above helps sort out some of your css precedence issues. Most of the time if you have a conflict in styles the issue will come down to specificity. At times when you haven&#8217;t declared some css, but an element is behaving in a way you don&#8217;t expect it&#8217;s likely that element has inherited some css from a parent container or a default style of the browser.</p>
<p>A general rule of thumb when declaring your css is to declare properties with the least specificity needed to style your elements. Use #sidebar instead of div#sidebar for example. I admit to breaking this general rule far more than I should, but by using the least specificity needed it will make it easier for you to override a style by declaring a style more specific.</p>
<p>If you use the most specificity you may run into problems later and find yourself having to add unnecessary html in order to be able to add more specificity or you may find yourself falling back on using !important or declaring inline styles. Start with the least specificity and add more only as needed.</p>
<p></p>
<p><a href="http://www.vanseodesign.com/blog/css/css-specificity-inheritance-cascaade/">Understanding Style Precedence in CSS: Specificity, Inheritance, and the Cascade</a></p>

<p><a href="http://feedads.g.doubleclick.net/~a/MYJbWwTWTzaNcV5vt8vnXBrwGZc/0/da"><img src="http://feedads.g.doubleclick.net/~a/MYJbWwTWTzaNcV5vt8vnXBrwGZc/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/MYJbWwTWTzaNcV5vt8vnXBrwGZc/1/da"><img src="http://feedads.g.doubleclick.net/~a/MYJbWwTWTzaNcV5vt8vnXBrwGZc/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TheVanBlog?a=v5Vw30iWmzU:zUGBzAfT6FU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/TheVanBlog?i=v5Vw30iWmzU:zUGBzAfT6FU:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheVanBlog?a=v5Vw30iWmzU:zUGBzAfT6FU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/TheVanBlog?i=v5Vw30iWmzU:zUGBzAfT6FU:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheVanBlog?a=v5Vw30iWmzU:zUGBzAfT6FU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheVanBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheVanBlog?a=v5Vw30iWmzU:zUGBzAfT6FU:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/TheVanBlog?i=v5Vw30iWmzU:zUGBzAfT6FU:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheVanBlog/~4/v5Vw30iWmzU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.vanseodesign.com/blog/css/css-specificity-inheritance-cascaade/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		<feedburner:origLink>http://www.vanseodesign.com/blog/css/css-specificity-inheritance-cascaade/</feedburner:origLink></item>
		<item>
		<title>Jammed Finger, Hacked Sites, And A New Twitter Client</title>
		<link>http://feedproxy.google.com/~r/TheVanBlog/~3/tCvcvD9nhqo/</link>
		<comments>http://www.vanseodesign.com/blog/whatever/jammed-finger-hacked-sites-and-a-new-twitter-client/#comments</comments>
		<pubDate>Thu, 28 May 2009 19:48:50 +0000</pubDate>
		<dc:creator>Steven Bradley</dc:creator>
				<category><![CDATA[Whatever]]></category>

		<guid isPermaLink="false">http://www.vanseodesign.com/blog/?p=678</guid>
		<description>How&amp;#8217;s that for a non-sequitor page title?
The first part relates to a softball injury I suffered last night, the second is some info about a recent hack in the wild that affected a friend&amp;#8217;s sites, and the last refers to a new Twitter client that I think goes one better than most of the current [...]&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.vanseodesign.com/blog/whatever/jammed-finger-hacked-sites-and-a-new-twitter-client/"&gt;Jammed Finger, Hacked Sites, And A New Twitter Client&lt;/a&gt;&lt;/p&gt;</description>
			<content:encoded><![CDATA[<p>How&#8217;s that for a non-sequitor page title?</p>
<p>The first part relates to a softball injury I suffered last night, the second is some info about a recent hack in the wild that affected a friend&#8217;s sites, and the last refers to a new Twitter client that I think goes one better than most of the current crop.<br />
<span id="more-678"></span></p>
<h2>Jammed Finger</h2>
<div  class="alignleft">
<a href="http://www.flickr.com/photos/20945389@N00/128614778/" title="Baseball Glove" target="_blank"><img src="http://farm1.static.flickr.com/50/128614778_57e6b82558_m.jpg" alt="Baseball Glove" border="0" width="240" height="180" /></a><br /><small><a href="http://creativecommons.org/licenses/by/2.0/" title="Attribution License" target="_blank"><img src="http://www.vanseodesign.com/blog/wp-content/plugins/photo-dropper/images/cc.png" alt="Creative Commons License" border="0" width="16" height="16" align="absmiddle" /></a> <a href="http://www.photodropper.com/photos/" target="_blank">photo</a> credit: <a href="http://www.flickr.com/photos/20945389@N00/128614778/" title="Gaspa" target="_blank">Gaspa</a></small>
</div>
<p>If you don&#8217;t know how much of a baseball fanatic I am, you haven&#8217;t been reading here very long. I love baseball and all things related. From March though October I play 3rd base one night each week for a pretty good softball team.</p>
<p>Last night in the closing inning of the game the first hitter for the other team hit foul popup midway between the plate and 3rd. I&#8217;m generally good at charging and sliding in under the ball to make the catch. This time the ball didn&#8217;t stay in the air too long and I wasn&#8217;t sure I&#8217;d be able to get there in time.</p>
<p>I ended up making more of a dive than a slide and somehow got my glove under the ball at the exact moment it was about to touch the dirt. I rolled over my wrist, managed to hold onto the ball, and held it up for the ump to see. If I do say so myself it was a very nice catch, probably one of the best I&#8217;ve ever made. It was the kind of catch that would make the top 10 plays of the day, week, and even find it&#8217;s way into all those shows at the end of the year. Yeah, it was that good.</p>
<p>Unfortunately in making the play I jammed a finger on my glove hand pretty bad (Don&#8217;t worry mom, I&#8217;m ok). I iced it last night, but I woke up to a finger twice its normal size, feeling like 10 times its normal size. Ouch. Typing is not my friend today.</p>
<p>Why am I telling you all this? Well it was a really nice catch and I don&#8217;t mind bragging a little bit. I also hit well last night and we won the game. But mostly I&#8217;m letting people know if they don&#8217;t get an email from me the next few days it&#8217;s because typing isn&#8217;t that easy at the moment. I figured one blog post was better than a number of emails. You don&#8217;t realize how much you rely on a single finger until you can&#8217;t use it for a time.</p>
<p><a href="http://www.flickr.com/photos/84041076@N00/85306062/" title="Hacking at Amazon" target="_blank"><img src="http://farm1.static.flickr.com/39/85306062_6aa393a61e_m.jpg" alt="Hacking at Amazon" border="0" width="465" height="349"/></a><br /><small><a href="http://creativecommons.org/licenses/by-sa/2.0/" title="Attribution-ShareAlike License" target="_blank"><img src="http://www.vanseodesign.com/blog/wp-content/plugins/photo-dropper/images/cc.png" alt="Creative Commons License" border="0" width="16" height="16" align="absmiddle" /></a> <a href="http://www.photodropper.com/photos/" target="_blank">photo</a> credit: <a href="http://www.flickr.com/photos/84041076@N00/85306062/" title="srid" target="_blank">srid</a></small></p>
<h2>Hacked Sites</h2>
<p>Hopefully none of you will have to deal with this, but a friend of mine recently had her sites hacked by something being referred to as gumblar.cn or martuz.cn. The hack infects your computer and grabs FTP credentials to then inject itself all over your site or sites.</p>
<p>Your website will then be serving a javascript file to infect others. The virus also alters Google search results to send you to the hacker&#8217;s affiliate sites I believe.</p>
<p>We think my friend caught the virus during a brief time when her machine was without anti-virus protection. She&#8217;s had three sites infected and subsequently blocked by Google for having malicious code. We think a 4th site might become infected and we&#8217;re keeping an eye on.</p>
<p>The best sources of information I&#8217;ve found about the gumblar and martuz comes from the unmaskparasites website</p>
<ul>
<li><a href="http://blog.unmaskparasites.com/2009/05/07/gumblar-cn-exploit-12-facts-about-this-injected-script/">Gumblar .cn Exploit &#8211; 12 Facts About This Injected Script</a></li>
<li><a href="http://blog.unmaskparasites.com/2009/05/18/martuz-cn-is-a-new-incarnation-of-gumblar-exploit/">Martuz .cn &#8211; New Incarnation of the Gumblar Exploit. So What’s New?</a></li>
<li><a href="http://delicious.com/vangogh99/gumblar.cn">Stuff I&#8217;ve bookmarked at Delicious</a></li>
</ul>
<p>The hack leaves code in a lot of files across your site. It creates an image.php and gifimage.php file in every images folder, leaves some encoded javascript at the bottom of .js files and just before the <body> tag on .html and .php files. In some cases it&#8217;s also leaving a block php code at the very top of files. We only found the php code at the top of index.php files on one of the three sites.</p>
<p>You really need to go through every file on your server looking for this thing. This thing gets into tmp folders and anywhere else it can.</p>
<p>The hacker also changes some folder permissions in order to leave himself a back door to get in again after you change your login info. It&#8217;s a nasty little thing. Hopefully you won&#8217;t have to deal with this, but if you do check the two links above for instructions on how to clean your site.</p>
<h2>New Twitter Client</h2>
<p>How about some good news now?</p>
<p>A couple nights ago I read (on Read Write Web?) about a new Twitter desktop client. I know, I know, yet another Twitter desktop client. This one is called <a href="http://mixero.com/">Mixero</a> and goes beyond some of the other current favorites like TweetDeck.</p>
<p><img class="center" src="http://www.vanseodesign.com/blog/images/mixero.jpg" /></p>
<p>Mixero offers groups and filtering and searching, but I think it goes one better in the organization and the functionality currently available in other clients.</p>
<p>One thing I really like is its ability to stay our of the way when you aren&#8217;t actively tweeting, while still be there to the side when you want a quick update. While I like TweetDeck it takes up too much screen real estate for me.</p>
<p>Another nice feature is that you can mouseover shortened urls to see where they really go before clicking. You can also preview pics and videos in the client.</p>
<p>Instead of trying to list all the features here, I&#8217;ll suggest you <a href="http://mixero.com/">visit the site</a> and watch the video. It&#8217;s in the upper right.</p>
<p>You won&#8217;t currently find a download link, though. Fill out the contact form and ask for an invite to help beta test if you want to give it a spin.</p>
<p>I haven&#8217;t had a chance to tweet much (that finger thing) but I did begin setting up groups and channels last night. My one complaint would be that Mixero has a Vista look that&#8217;s out of place on my MacBook. A minor complaint, yet one I hope can be corrected in some way. I have a hunch Mixero is going to be the client I use for awhile as it solves a few problems I&#8217;ve had with other clients.</p>
<p>Enjoy the end of the week and the weekend. Hopefully the on again off again icing I&#8217;m doing will reduce the swelling in my finger (Don&#8217;t worry mom, I really am ok) and I&#8217;ll be back to 100% typing speed in a couple of days.</p>
<p></p>
<p><a href="http://www.vanseodesign.com/blog/whatever/jammed-finger-hacked-sites-and-a-new-twitter-client/">Jammed Finger, Hacked Sites, And A New Twitter Client</a></p>

<p><a href="http://feedads.g.doubleclick.net/~a/qag1o-vk0aaGS0DAwpbxACB1KqA/0/da"><img src="http://feedads.g.doubleclick.net/~a/qag1o-vk0aaGS0DAwpbxACB1KqA/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/qag1o-vk0aaGS0DAwpbxACB1KqA/1/da"><img src="http://feedads.g.doubleclick.net/~a/qag1o-vk0aaGS0DAwpbxACB1KqA/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TheVanBlog?a=tCvcvD9nhqo:DtRGJ_XmYuE:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/TheVanBlog?i=tCvcvD9nhqo:DtRGJ_XmYuE:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheVanBlog?a=tCvcvD9nhqo:DtRGJ_XmYuE:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/TheVanBlog?i=tCvcvD9nhqo:DtRGJ_XmYuE:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheVanBlog?a=tCvcvD9nhqo:DtRGJ_XmYuE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheVanBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheVanBlog?a=tCvcvD9nhqo:DtRGJ_XmYuE:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/TheVanBlog?i=tCvcvD9nhqo:DtRGJ_XmYuE:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheVanBlog/~4/tCvcvD9nhqo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.vanseodesign.com/blog/whatever/jammed-finger-hacked-sites-and-a-new-twitter-client/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		<feedburner:origLink>http://www.vanseodesign.com/blog/whatever/jammed-finger-hacked-sites-and-a-new-twitter-client/</feedburner:origLink></item>
		<item>
		<title>Are You Focusing On The Wrong Goals?</title>
		<link>http://feedproxy.google.com/~r/TheVanBlog/~3/KA-PpHea9hI/</link>
		<comments>http://www.vanseodesign.com/blog/marketing/focusing-wrong-goals/#comments</comments>
		<pubDate>Tue, 19 May 2009 18:48:28 +0000</pubDate>
		<dc:creator>Steven Bradley</dc:creator>
				<category><![CDATA[Marketing]]></category>

		<guid isPermaLink="false">http://www.vanseodesign.com/blog/?p=669</guid>
		<description>There are many intermediate goals along the way to your desired result. These intermediate steps are not, however, the end goal, but too often they get treated as if they are.


Just because someone follows your tweets, it doesn&amp;#8217;t mean they pay attention to anything you say.
Just because someone clicks a link to your site, it [...]&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.vanseodesign.com/blog/marketing/focusing-wrong-goals/"&gt;Are You Focusing On The Wrong Goals?&lt;/a&gt;&lt;/p&gt;</description>
			<content:encoded><![CDATA[<p>There are many intermediate goals along the way to your desired result. These intermediate steps are not, however, the end goal, but too often they get treated as if they are.<br />
<span id="more-669"></span></p>
<ul>
<li>Just because someone follows your tweets, it doesn&#8217;t mean they pay attention to anything you say.</li>
<li>Just because someone clicks a link to your site, it doesn&#8217;t mean they have any interest in what you&#8217;re offering.</li>
<li>Just because someone subscribed to your blog, it doesn&#8217;t mean they ever read your posts.</li>
</ul>
<p>More people visiting your site probably means more sales, but it doesn&#8217;t have to. A sale does not automatically follow from a visit. In order to become a sale or a lead a visitor needs to go through a variety of intermediate steps. All those steps are important, but they aren&#8217;t the end goal.</p>
<h2>Crossroads are not the Final Destination</h2>
<div class="alignleft">
<a href="http://www.flickr.com/photos/25005243@N04/3546480670/" title="Spaziergang am 19.Mai 2009" target="_blank"><img src="http://farm4.static.flickr.com/3328/3546480670_e6dc5a8f55_m.jpg" alt="Spaziergang am 19.Mai 2009" border="0" width="240" height="180" /></a><br /><small><a href="http://creativecommons.org/licenses/by-sa/2.0/" title="Attribution-ShareAlike License" target="_blank"><img src="http://www.vanseodesign.com/blog/wp-content/plugins/photo-dropper/images/cc.png" alt="Creative Commons License" border="0" width="16" height="16" align="absmiddle" /></a> <a href="http://www.photodropper.com/photos/" target="_blank">photo</a> credit: <a href="http://www.flickr.com/photos/25005243@N04/3546480670/" title="Last Hero" target="_blank">Last Hero</a></small>
</div>
<p>You need to understand the difference between your end goal and the intermediate points along the path. Those points are like crossroads and people arriving at them have several options to choose.</p>
<p>If you treat intermediate goals as end goals you allow people to go whichever way they want. If you see them as crossroads you can build signs to lead people further down your path.</p>
<ul>
<li>Ranking #1 for a query is meaningless unless the query is one that people actually type into a search engine and those people are potentially going to be interested in your site.</li>
<li>Submitting content to a social voting site is meaningless unless the community of the site is likely to be interested in the content.</li>
<li>Placing an ad in a magazine is meaningless unless your market reads that magazine.</li>
</ul>
<p>Understand what you are trying to achieve and understand how every step in the process contributes to your end goals. Focus your efforts on what leads people down the path you want them to take instead of focusing on intermediate points that allow people to leave your path altogether.</p>
<p></p>
<p><a href="http://www.vanseodesign.com/blog/marketing/focusing-wrong-goals/">Are You Focusing On The Wrong Goals?</a></p>

<p><a href="http://feedads.g.doubleclick.net/~a/T8xy9ROmcI52n5w11dx3mjKTkDQ/0/da"><img src="http://feedads.g.doubleclick.net/~a/T8xy9ROmcI52n5w11dx3mjKTkDQ/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/T8xy9ROmcI52n5w11dx3mjKTkDQ/1/da"><img src="http://feedads.g.doubleclick.net/~a/T8xy9ROmcI52n5w11dx3mjKTkDQ/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TheVanBlog?a=KA-PpHea9hI:B9xrSYrDlAk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/TheVanBlog?i=KA-PpHea9hI:B9xrSYrDlAk:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheVanBlog?a=KA-PpHea9hI:B9xrSYrDlAk:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/TheVanBlog?i=KA-PpHea9hI:B9xrSYrDlAk:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheVanBlog?a=KA-PpHea9hI:B9xrSYrDlAk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheVanBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheVanBlog?a=KA-PpHea9hI:B9xrSYrDlAk:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/TheVanBlog?i=KA-PpHea9hI:B9xrSYrDlAk:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheVanBlog/~4/KA-PpHea9hI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.vanseodesign.com/blog/marketing/focusing-wrong-goals/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		<feedburner:origLink>http://www.vanseodesign.com/blog/marketing/focusing-wrong-goals/</feedburner:origLink></item>
		<item>
		<title>Cropping Images For Maximum Impact</title>
		<link>http://feedproxy.google.com/~r/TheVanBlog/~3/vCmu2lQbI1E/</link>
		<comments>http://www.vanseodesign.com/blog/web-design/cropping-images-for-maximum-impact/#comments</comments>
		<pubDate>Wed, 13 May 2009 13:00:05 +0000</pubDate>
		<dc:creator>Steven Bradley</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.vanseodesign.com/blog/?p=656</guid>
		<description>When adding images to your site or blog posts do you take the time to crop them to create a more dynamic and visually interesting image? Here&amp;#8217;s a simple trick when you have an image that includes the horizon though the main idea will work with the subject of any image.

Consider the image below of [...]&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.vanseodesign.com/blog/web-design/cropping-images-for-maximum-impact/"&gt;Cropping Images For Maximum Impact&lt;/a&gt;&lt;/p&gt;</description>
			<content:encoded><![CDATA[<p>When adding images to your site or blog posts do you take the time to crop them to create a more dynamic and visually interesting image? Here&#8217;s a simple trick when you have an image that includes the horizon though the main idea will work with the subject of any image.<br />
<span id="more-656"></span><br />
Consider the image below of a sunset over the ocean.</p>
<div class="center"><img src="http://www.vanseodesign.com/blog/images/horizon-center.jpg" alt="sunset over the ocean with horizon centered vertically" /><br />photo credit: <a href="http://www.flickr.com/photos/nxb/515981709/" title="Waves at Sunset" target="_blank">Waves at Sunset</a></div>
<p>At first glance it&#8217;s a nice image. We have the sun setting over crashing waves. But where is your eye drawn? What is the main subject of this image? Where you should you look?</p>
<p>Odds are your eye goes back and forth between the waves and the clouds always drawn back to the sun and the horizon in the center of the image.</p>
<p>The center of an image is not the ideal location for the horizon (or any subject). It leaves the viewer questioning whether to look at the sky or the earth below. Centering the horizon creates a static image.</p>
<h2>Crop image with the horizon at bottom</h2>
<p><img class="centered" src="http://www.vanseodesign.com/blog/images/horizon-bottom.jpg" alt="sunset over the ocean with horizon at bottom" /></p>
<p>Here I&#8217;ve cropped the image so the horizon sits at the bottom. Notice where your eye is now drawn. Mine ends up on the cloud directly above the sun.</p>
<p>Here there&#8217;s no question where to look. The sky dominates the image and becomes the focus. This image is more dynamic now that the horizon has been pulled down and off center.</p>
<p>But those waves looked nice didn&#8217;t they?</p>
<h2>Crop image with the horizon at top</h2>
<p><img class="centered" src="http://www.vanseodesign.com/blog/images/horizon-top.jpg" alt="sunset over the ocean with horizen at top" /></p>
<p>Here&#8217;s our same image again only this time cropped with the horizon at the top. Our waves are back, though much stronger. Your eye isn&#8217;t being pulled away from them toward the sky as it was in the original image.</p>
<p>Without the sky you can feel the force of the waves.</p>
<p>Again by moving the horizon off center we&#8217;ve created a stronger and more dynamic image with greater tension.</p>
<h2>How to decide where the horizon belongs</h2>
<p>Neither of the images above is automatically better than the other. Your choice of where to crop depends on the image and what you&#8217;re trying to communicate. You have to decide what feeling you want to convey and which crop works better with your design or content.</p>
<p>The main thing to take away is that a centered horizon is generally a bad idea unless you&#8217;re trying to communicate the concept of static. Most of the time you&#8217;ll do better to place the horizon above or below the center and the further away from center the more dynamic your image will be.</p>
<p>When taking pictures do you notice yourself placing your subject dead center? Do you crop your images later to create more visual interest?</p>
<p>Try moving your subject off center either when capturing the original image or later through cropping.</p>
<p></p>
<p><a href="http://www.vanseodesign.com/blog/web-design/cropping-images-for-maximum-impact/">Cropping Images For Maximum Impact</a></p>

<p><a href="http://feedads.g.doubleclick.net/~a/6kPGC-i1bLVi8a_waIEq7p1FmCw/0/da"><img src="http://feedads.g.doubleclick.net/~a/6kPGC-i1bLVi8a_waIEq7p1FmCw/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/6kPGC-i1bLVi8a_waIEq7p1FmCw/1/da"><img src="http://feedads.g.doubleclick.net/~a/6kPGC-i1bLVi8a_waIEq7p1FmCw/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TheVanBlog?a=vCmu2lQbI1E:nXYxpHJCnLg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/TheVanBlog?i=vCmu2lQbI1E:nXYxpHJCnLg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheVanBlog?a=vCmu2lQbI1E:nXYxpHJCnLg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/TheVanBlog?i=vCmu2lQbI1E:nXYxpHJCnLg:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheVanBlog?a=vCmu2lQbI1E:nXYxpHJCnLg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheVanBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheVanBlog?a=vCmu2lQbI1E:nXYxpHJCnLg:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/TheVanBlog?i=vCmu2lQbI1E:nXYxpHJCnLg:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheVanBlog/~4/vCmu2lQbI1E" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.vanseodesign.com/blog/web-design/cropping-images-for-maximum-impact/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://www.vanseodesign.com/blog/web-design/cropping-images-for-maximum-impact/</feedburner:origLink></item>
		<item>
		<title>How To Organize CSS Files?</title>
		<link>http://feedproxy.google.com/~r/TheVanBlog/~3/rxRwcFGcgo8/</link>
		<comments>http://www.vanseodesign.com/blog/css/how-to-organize-css-files/#comments</comments>
		<pubDate>Fri, 01 May 2009 13:00:33 +0000</pubDate>
		<dc:creator>Steven Bradley</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.vanseodesign.com/blog/?p=643</guid>
		<description>You might have noticed the title of this post is phrased as a question. That&amp;#8217;s because this post isn&amp;#8217;t meant as a me telling you how to organize your css, but rather it&amp;#8217;s intended as an open discussion. I&amp;#8217;ll share some thoughts and I hope those of you who are css coders will chime in [...]&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.vanseodesign.com/blog/css/how-to-organize-css-files/"&gt;How To Organize CSS Files?&lt;/a&gt;&lt;/p&gt;</description>
			<content:encoded><![CDATA[<p>You might have noticed the title of this post is phrased as a question. That&#8217;s because this post isn&#8217;t meant as a me telling you how to organize your css, but rather it&#8217;s intended as an open discussion. I&#8217;ll share some thoughts and I hope those of you who are css coders will chime in with some thoughts of your own.<br />
<span id="more-643"></span><br />
Before I begin let me say this post isn&#8217;t meant to be an all encompassing how to organize your css either. I&#8217;m mostly thinking and asking about top level organization.</p>
<p>Should you organize styles around your html structure or should you organize styles around different aspects of design like layout and color?</p>
<p>In the future I&#8217;ll put together a more thorough and detailed post on organizing your css if you&#8217;d like.</p>
<h2>Organizing CSS Around Your HTML Structure</h2>
<p>For years I&#8217;ve been organizing my css files mostly the same way. The files will follow a top down approach matching how the design is coded. I&#8217;ll usually start with basic html elements followed by common classes and then add sections that mimic the html structure. It generally looks something like this:</p>
<pre class="css">
<span class="cssSelector">body {</span>font:16px helvetica, verdana, arial, sans-serif<span class="cssSelector">}</span>
<span class="cssSelector">h1 {</span><span class="cssProperty">font-size</span><span class="cssRest">:</span><span class="cssValue">24px</span><span class="cssRest">;</span> <span class="cssProperty">margin</span><span class="cssRest">:</span><span class="cssValue">0 0 20px 0</span><span class="cssRest">;</span> color:#00f<span class="cssSelector">}</span>
<span class="cssSelector">h2 {</span><span class="cssProperty">font-size</span><span class="cssRest">:</span><span class="cssValue">24px</span><span class="cssRest">;</span> <span class="cssProperty">margin</span><span class="cssRest">:</span><span class="cssValue">20px 0 0 0</span><span class="cssRest">;</span> color:#0f0<span class="cssSelector">}</span>
<span class="cssSelector">alignleft {</span><span class="cssProperty">float</span><span class="cssRest">:</span><span class="cssValue"> left</span><span class="cssRest">;</span>  margin:0 10px 10px 0<span class="cssSelector">}</span>
<span class="cssSelector">alignright {</span><span class="cssProperty">float</span><span class="cssRest">:</span><span class="cssValue"> right</span><span class="cssRest">;</span> margin:0 0 10px 10px<span class="cssSelector">}</span>
<span class="cssSelector">.center {</span><span class="cssProperty">text-align</span><span class="cssRest">:</span><span class="cssValue"> center</span><span class="cssRest">;</span><span class="cssSelector">}</span>
<span class="cssSelector">#wrapper {</span><span class="cssProperty">width</span><span class="cssRest">:</span><span class="cssValue">960px</span><span class="cssRest">;</span> margin:0 auto<span class="cssSelector">}</span>
<span class="cssSelector">#header {</span><span class="cssProperty">background</span><span class="cssRest">:</span><span class="cssValue">#333</span><span class="cssRest">;</span> <span class="cssProperty">color</span><span class="cssRest">:</span><span class="cssValue">#eee</span><span class="cssRest">;</span> border-bottom:1px solid #000<span class="cssSelector">}</span>
<span class="cssSelector">#nav {</span><span class="cssProperty">margin</span><span class="cssRest">:</span><span class="cssValue">0;  background:#777</span><span class="cssRest">;</span><span class="cssSelector">}</span>
<span class="cssSelector">#nav li {</span><span class="cssProperty">float</span><span class="cssRest">:</span><span class="cssValue">left</span><span class="cssRest">;</span> <span class="cssProperty">padding</span><span class="cssRest">:</span><span class="cssValue">3px 0</span><span class="cssRest">;</span><span class="cssSelector">}</span>
<span class="cssSelector">#nav li a {</span><span class="cssProperty">padding</span><span class="cssRest">:</span><span class="cssValue">5px 10px</span><span class="cssRest">;</span> <span class="cssProperty">text-decoration</span><span class="cssRest">:</span><span class="cssValue">none</span><span class="cssRest">;</span> <span class="cssProperty">color</span><span class="cssRest">:</span><span class="cssValue">#fff</span><span class="cssRest">;</span> <span class="cssProperty">font-size</span><span class="cssRest">:</span><span class="cssValue">12px</span><span class="cssRest">;</span><span class="cssSelector">}</span>
<span class="cssSelector">#sidebar {</span><span class="cssProperty">float</span><span class="cssRest">:</span><span class="cssValue">left</span><span class="cssRest">;</span> <span class="cssProperty">width</span><span class="cssRest">:</span><span class="cssValue">320px</span><span class="cssRest">;</span> <span class="cssProperty">font-size</span><span class="cssRest">:</span><span class="cssValue">12px</span><span class="cssRest">;</span> <span class="cssProperty">line-height</span><span class="cssRest">:</span><span class="cssValue">18px</span><span class="cssRest">;</span> margin:20px 0<span class="cssSelector">}</span>
<span class="cssSelector">#sidebar h2 {</span><span class="cssProperty">font-size</span><span class="cssRest">:</span><span class="cssValue">18px</span><span class="cssRest">;</span> border-bottom:1px solid #999<span class="cssSelector">}</span>
<span class="cssSelector">#content {</span><span class="cssProperty">float</span><span class="cssRest">:</span><span class="cssValue">left</span><span class="cssRest">;</span> <span class="cssProperty">width</span><span class="cssRest">:</span><span class="cssValue">600px</span><span class="cssRest">;</span> <span class="cssProperty">margin</span><span class="cssRest">:</span><span class="cssValue">0; padding-right:20px</span><span class="cssRest">;</span> <span class="cssProperty">font-size</span><span class="cssRest">:</span><span class="cssValue">14px</span><span class="cssRest">;</span> line-height:21px<span class="cssSelector">}</span>
<span class="cssSelector">#content ul {</span>list-style:disc<span class="cssSelector">}</span>
<span class="cssSelector">#footer {</span>clear:both<span class="cssSelector">}</span>
<span class="cssSelector">#footer p {</span>text-align:center<span class="cssSelector">}</span>
</pre>
<h2>Organizing CSS Around Aspects Of Design</h2>
<p>Lately while working on a WordPress theme framework I&#8217;ve been thinking if another approach might be better. Instead of following the html structure I&#8217;ve wondered if it would be better to have sections based on different aspects of design.</p>
<p>For example a section of css for layout, another section for typography, and another for color. If you rewrote the css above this way you might end up with something like this:</p>
<pre class="css">
<span class="cssComment">/* ------------------------------
 		 layout
 ----------------------------- */</span>
<span class="cssSelector">#wrapper {</span><span class="cssProperty">width</span><span class="cssRest">:</span><span class="cssValue">960px</span><span class="cssRest">;</span> margin:0 auto<span class="cssSelector">}</span>
<span class="cssSelector">#sidebar {</span><span class="cssProperty">float</span><span class="cssRest">:</span><span class="cssValue">left</span><span class="cssRest">;</span> <span class="cssProperty">width</span><span class="cssRest">:</span><span class="cssValue">320px</span><span class="cssRest">;</span> margin:20px 0<span class="cssSelector">}</span>
<span class="cssSelector">#content {</span><span class="cssProperty">float</span><span class="cssRest">:</span><span class="cssValue">left</span><span class="cssRest">;</span> <span class="cssProperty">width</span><span class="cssRest">:</span><span class="cssValue">600px</span><span class="cssRest">;</span> <span class="cssProperty">margin</span><span class="cssRest">:</span><span class="cssValue">0; padding-right:20px</span><span class="cssRest">;</span> <span class="cssSelector">}</span>
<span class="cssSelector">#footer {</span>clear:both<span class="cssSelector">}</span>
<span class="cssSelector">#footer p {</span>text-align:center<span class="cssSelector">}</span>
<span class="cssComment">/* -----------------------------
 		Typography
----------------------------- */</span>
<span class="cssSelector">body {</span>font:16px helvetica, verdana, arial, sans-serif<span class="cssSelector">}</span>
<span class="cssSelector">h1 {</span><span class="cssProperty">font-size</span><span class="cssRest">:</span><span class="cssValue">24px</span><span class="cssRest">;</span> <span class="cssProperty">margin</span><span class="cssRest">:</span><span class="cssValue">0 0 20px 0</span><span class="cssRest">;</span><span class="cssSelector">}</span>
<span class="cssSelector">h2 {</span><span class="cssProperty">font-size</span><span class="cssRest">:</span><span class="cssValue">24px</span><span class="cssRest">;</span> <span class="cssProperty">margin</span><span class="cssRest">:</span><span class="cssValue">20px 0 0 0</span><span class="cssRest">;</span> <span class="cssSelector">}</span>
<span class="cssSelector">#nav li a {</span><span class="cssProperty">font-size</span><span class="cssRest">:</span><span class="cssValue">12px</span><span class="cssRest">;</span><span class="cssSelector">}</span>
<span class="cssSelector">#sidebar {</span><span class="cssProperty">font-size</span><span class="cssRest">:</span><span class="cssValue">12px</span><span class="cssRest">;</span> <span class="cssProperty">line-height</span><span class="cssRest">:</span><span class="cssValue">18px</span><span class="cssRest">;</span><span class="cssSelector">}</span>
<span class="cssSelector">#sidebar h2 {</span><span class="cssProperty">font-size</span><span class="cssRest">:</span><span class="cssValue">18px</span><span class="cssRest">;</span> <span class="cssSelector">}</span>
<span class="cssSelector">#content {</span><span class="cssProperty">ffont-size</span><span class="cssRest">:</span><span class="cssValue">14px</span><span class="cssRest">;</span> line-height:21px<span class="cssSelector">}</span>
<span class="cssComment">/* ------------------------------
 		Color
 ----------------------------- */</span>
<span class="cssSelector">h1 {</span> <span class="cssProperty">color</span><span class="cssRest">:</span><span class="cssValue">#00f</span><span class="cssRest">;</span><span class="cssSelector">}</span>
<span class="cssSelector">h2 {</span>color:#0f0<span class="cssSelector">}</span>
<span class="cssSelector">#header {</span><span class="cssProperty">background</span><span class="cssRest">:</span><span class="cssValue">#333</span><span class="cssRest">;</span> <span class="cssProperty">color</span><span class="cssRest">:</span><span class="cssValue">#eee</span><span class="cssRest">;</span><span class="cssSelector">}</span>
<span class="cssSelector">#nav {</span> <span class="cssProperty">background</span><span class="cssRest">:</span><span class="cssValue">#777</span><span class="cssRest">;</span><span class="cssSelector">}</span>
<span class="cssSelector">#nav li a {</span><span class="cssProperty">color</span><span class="cssRest">:</span><span class="cssValue">#fff</span><span class="cssRest">;</span> <span class="cssSelector">}</span>
<span class="cssComment">/* ------------------------------
 		Common
 ----------------------------- */</span>
<span class="cssSelector">alignleft {</span><span class="cssProperty">float</span><span class="cssRest">:</span><span class="cssValue"> left</span><span class="cssRest">;</span>  margin:0 10px 10px 0<span class="cssSelector">}</span>
<span class="cssSelector">alignright {</span><span class="cssProperty">float</span><span class="cssRest">:</span><span class="cssValue"> right</span><span class="cssRest">;</span> margin:0 0 10px 10px<span class="cssSelector">}</span>
<span class="cssSelector">.center {</span><span class="cssProperty">text-align</span><span class="cssRest">:</span><span class="cssValue"> center</span><span class="cssRest">;</span><span class="cssSelector">}</span>
<span class="cssSelector">#header {</span>border-bottom:1px solid #000<span class="cssSelector">}</span>
<span class="cssSelector">#nav {</span>margin:0; <span class="cssSelector">}</span>
<span class="cssSelector">#nav li {</span><span class="cssProperty">float</span><span class="cssRest">:</span><span class="cssValue">left</span><span class="cssRest">;</span> <span class="cssProperty">padding</span><span class="cssRest">:</span><span class="cssValue">3px 0</span><span class="cssRest">;</span><span class="cssSelector">}</span>
<span class="cssSelector">#nav li a {</span><span class="cssProperty">padding</span><span class="cssRest">:</span><span class="cssValue">5px 10px</span><span class="cssRest">;</span> <span class="cssProperty">text-decoration</span><span class="cssRest">:</span><span class="cssValue">none</span><span class="cssRest">;</span> <span class="cssProperty">color</span><span class="cssRest">:</span><span class="cssValue">#fff</span><span class="cssRest">;</span> <span class="cssProperty">font-size</span><span class="cssRest">:</span><span class="cssValue">12px</span><span class="cssRest">;</span><span class="cssSelector">}</span>
<span class="cssSelector">#sidebar h2 {</span>border-bottom:1px solid #999<span class="cssSelector">}</span>
<span class="cssSelector">#content ul {</span>list-style:disc<span class="cssSelector">}</span>
</pre>
<h2>Advantages and Disadvantages of Both Approaches</h2>
<p>I can see advantages to both approaches. The top down approach makes it easier to work on a specific section of the site. Say you want to make changes only to your site&#8217;s navigation. In that case it would be nice to have all the navigation css in one place.</p>
<p>On the other hand say you&#8217;d like to keep everything as is, but would like to change the color scheme of your site. In that case it would likely be easier to have all the css controlling the color in one place.</p>
<p>The disadvantage in either case is whichever you choose you lose out on the other.</p>
<p>If you take the top down approach and want to change your typography you have to constantly scroll throughout your css to find different typographic styles. Changing layouts this way can be a bit of a nightmare as some of you probably know.</p>
<p>If you organize around aspects of your design then you have to look in several places to work on just your navigation or your sidebar.</p>
<p>One other problem is deciding what goes where if you use shortcuts. Take something like the border property. Using shortcuts you might have something like:</p>
<pre class="css">
<span class="cssSelector">border {</span>1px solid #333<span class="cssSelector">}</span>
</pre>
<p>If you only want to pull out the color you lose the shortcut. I think organizing around design aspects would end up leading to more overall code, though probably not too much.</p>
<h2>What&#8217;s Your Preference?</h2>
<p>I&#8217;m inclined to think organizing into layout, color, typography, etc will end up being more manageable and ultimately easier to work with and I&#8217;m leaning toward changing my css to follow that style.</p>
<p>What do you think? Do you use one or the other and which do you prefer? Do you think one approach would be more maintainable than the other or do you think this comes down to stylistic preference?</p>
<p></p>
<p><a href="http://www.vanseodesign.com/blog/css/how-to-organize-css-files/">How To Organize CSS Files?</a></p>

<p><a href="http://feedads.g.doubleclick.net/~a/uV_b6iKfPYULOTm4vYCG18mwlvc/0/da"><img src="http://feedads.g.doubleclick.net/~a/uV_b6iKfPYULOTm4vYCG18mwlvc/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/uV_b6iKfPYULOTm4vYCG18mwlvc/1/da"><img src="http://feedads.g.doubleclick.net/~a/uV_b6iKfPYULOTm4vYCG18mwlvc/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TheVanBlog?a=rxRwcFGcgo8:Clhg0cJk73U:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/TheVanBlog?i=rxRwcFGcgo8:Clhg0cJk73U:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheVanBlog?a=rxRwcFGcgo8:Clhg0cJk73U:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/TheVanBlog?i=rxRwcFGcgo8:Clhg0cJk73U:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheVanBlog?a=rxRwcFGcgo8:Clhg0cJk73U:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheVanBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheVanBlog?a=rxRwcFGcgo8:Clhg0cJk73U:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/TheVanBlog?i=rxRwcFGcgo8:Clhg0cJk73U:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheVanBlog/~4/rxRwcFGcgo8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.vanseodesign.com/blog/css/how-to-organize-css-files/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://www.vanseodesign.com/blog/css/how-to-organize-css-files/</feedburner:origLink></item>
		<item>
		<title>Design Basics: Proximity To Know What Belongs With What</title>
		<link>http://feedproxy.google.com/~r/TheVanBlog/~3/BJg6c3TGFW8/</link>
		<comments>http://www.vanseodesign.com/blog/web-design/design-basics-proximity-to-know-what-belongs-with-what/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 16:57:09 +0000</pubDate>
		<dc:creator>Steven Bradley</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.vanseodesign.com/blog/?p=631</guid>
		<description>So far in this series we&amp;#8217;ve taken an amateur design and improved it in several ways. We aligned design elements to provide a sense of order, we used repetition to create visual themes, and last week we used contrast to differentiate elements and call attention to them. Today we&amp;#8217;ll talk about the last of the [...]&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.vanseodesign.com/blog/web-design/design-basics-proximity-to-know-what-belongs-with-what/"&gt;Design Basics: Proximity To Know What Belongs With What&lt;/a&gt;&lt;/p&gt;</description>
			<content:encoded><![CDATA[<p>So far in this series we&#8217;ve taken an amateur design and improved it in several ways. We aligned design elements to provide a sense of order, we used repetition to create visual themes, and last week we used <a href="http://www.vanseodesign.com/blog/web-design/design-basics-contrast/">contrast to differentiate elements and call attention</a> to them. Today we&#8217;ll talk about the last of the four basic design principles, proximity.<br />
<span id="more-631"></span><br />
Proximity is about grouping related items. It lets you know at a glance that one sentence describes an image, while another sentence has nothing to do with that image. Proximity uses space to show similarity between elements and gives visual clues as to what goes with what.</p>
<h2>Where We&#8217;ve Been</h2>
<p>As we have throughout this series let&#8217;s begin by looking back at where we left off.</p>
<p><a rel="lightbox" href="http://www.vanseodesign.com/blog/images/design-basics/contrast-button.png" title="Using contrast in your call-to-action"><img class="centered" src="http://www.vanseodesign.com/blog/images/design-basics/th-contrast-button.jpg" alt="An example using contrast to emphasize your call-to-action" /></a></p>
<p>We&#8217;ve come a long way already. If you look at the image above it&#8217;s not a half bad design, especially when you consider we haven&#8217;t added anything that could be called visual eye candy. We&#8217;ve used a few simple principles of design to come up with a web page that clearly has a purpose.</p>
<p>You can tell the difference between major design elements. We know where the header ends and the content begins. We&#8217;re even being called to take a specific action on the page, which is clear at a glance.</p>
<p>We&#8217;re almost there. Now lets use the principle of proximity to further refine our design. The changes won&#8217;t be as dramatic as last time, but they will make for a more usable design.</p>
<h2>Proximity in the Sidebar</h2>
<p>I mentioned proximity is the concept of grouping related things together. We already have a fair amount of that going on. If you look at the image above it&#8217;s pretty clear that the content is grouped together and the navigation is grouped together and that each group is distinct from the other. We know where the header and footer begin and end and even have clues about what belongs together within each section of the design.</p>
<p>Still there are areas of the design where you might question if certain elements belong together. Look at the navigation in the sidebar. You might have noticed our navigation shows a series of links followed by a space and then by another series of links.</p>
<p>Do all those links go together? Is that second series of links really a set of links? They look the same, but why the gap?</p>
<p>Let&#8217;s fix things so the navigation is clearer. I&#8217;m going to say the links do belong to different groups and introduce another heading.</p>
<p>Here&#8217;s how our new sidebar looks in the overall design.</p>
<div class="centered">
<a rel="lightbox" href="http://www.vanseodesign.com/blog/images/design-basics/proximity-sidebar-before.png" title="Sidebar before proximity"><img class="alignleft" src="http://www.vanseodesign.com/blog/images/design-basics/th-proximity-sidebar-before.png" alt="Sidebar before proximity" /></a></p>
<p><a rel="lightbox" href="http://www.vanseodesign.com/blog/images/design-basics/proximity-sidebar-after.png" title="Sidebar after proximity"><img class="alignleft" src="http://www.vanseodesign.com/blog/images/design-basics/th-proximity-sidebar-after.png" alt="Sidebar after proximity" /></a>
</div>
<p>Notice the difference before and after we applied the principle of proximity. The difference is more subtle, but it&#8217;s now obvious the links, while related are somewhat different. In part it&#8217;s because we&#8217;ve added the extra heading, but it&#8217;s also due to the extra spacing we&#8217;ve place between them.</p>
<p>If we were to remove both headings, you&#8217;d probably still come to the conclusion that the groups of links were somehow different. The headings drive that home. Also notice how the Products heading is closer to the the product links than it is to the service links.</p>
<p>To emphasize things a little more I&#8217;ve also added a little more space between the product links and the text below. You likely weren&#8217;t going to confuse the text for links, but imagine it were a list instead of a paragraph. The extra space helps distinguish the that the text and links are not the same.</p>
<p><a rel="lightbox" href="http://www.vanseodesign.com/blog/images/design-basics/proximity-sidebar.png" title="Sidebar after proximity has been applied"><img class="centered" src="http://www.vanseodesign.com/blog/images/design-basics/th-proximity-sidebar.png" alt="An example using proximity to improve sidebar navigation" /></a></p>
<h2>Proximity in the Main Content</h2>
<p>Our sidebar is looking good, but what about our main content. Can we improve things there through the principle of proximity? I&#8217;m sure you know the question is rhetorical.</p>
<p>One thing we can do is something we just did in the sidebar. I mentioned how the Products heading is closer to the links it describes than it is to the links grouped under services. The headings and paragraphs in the content are currently evenly spaced.</p>
<p>Sure you&#8217;d guess that the heading describes the text below, but it doesn&#8217;t have to. What if were meant as a pull quote or if the heading was really the caption for an image. In those cases the spacing would play a large role in showing what goes with what.</p>
<p><a rel="lightbox" href="http://www.vanseodesign.com/blog/images/design-basics/proximity-final.png" title="Design with the principle of proximity applied"><img class="centered" src="http://www.vanseodesign.com/blog/images/design-basics/th-proximity-final.png" alt="An example of a design improved through proximity" /></a></p>
<p>I&#8217;ve done a few things in the image above. First I&#8217;ve changed the spacing between the headings and the paragraphs. Headings now sit closer to the paragraph below than above. Again you would likely have understood which paragraph the heading referred to, but it&#8217;s much more obvious now.</p>
<p>I&#8217;ve added one more change to the last two content sections. Compare how the two bulleted lists look here as they did at the start. Earlier they sat one under another in the same heading/text relationship as the paragraphs above.</p>
<p>Were the lists describing something similar? Was it simply coincidence that they fell one after the other?</p>
<p>Consider how they look now and what the grouping tells us. Each list has it&#8217;s own heading so they are somewhat different. Yet both fall under the same major heading indicating that they are somehow related too.</p>
<p>Perhaps each list describes the benefits of your business. Maybe the list on the left is talking about your services and the one on the right is talking about your products. The major heading then might be Benefits and the lesser headings might be Services and Products.</p>
<p>A lot of information is communicated just by the way we&#8217;ve changed how the lists are grouped together.</p>
<h2>Conclusion</h2>
<p>While not as dramatic as contrast or alignment, proximity still adds visual cues to what&#8217;s happening in your design. Of all the four basic principles, I think proximity is the one that gets missed the most often. It&#8217;s more subtle in many cases, but no less important.</p>
<p>Think about where we started when this series began and what we&#8217;ve accomplished. Our initial design was amateur. It was barely a design and yet sadly you&#8217;ve probably come across many web pages and websites that has a similar design.</p>
<p>Without having to add much in the way of visual eye candy, we arrived at a professional design by applying a few simple principles. The only images we&#8217;ve used are for the call to action button and in the logo and each could be replaced by a non image design element easily enough.</p>
<p>Is this design great? Well, no, but it has crossed from amateur into professional which is what we set out to do. I hope you enjoyed this series and see how powerful a few basic principles can be.</p>
<p>Now that you know what these 4 basic design principles are you should be able to see them in practice as you travel around the web. Take note of them when you do. Notice how one site uses alignment and how another uses repetition. Watch how contrast calls out different design elements and look for how proximity is used to make a design more understandable and usable.</p>
<h2>Posts in this series</h2>
<ul>
<li><a href="http://www.vanseodesign.com/blog/web-design/basic-design-principles/">Introduction</a></li>
<li><a href="http://www.vanseodesign.com/blog/web-design/design-basics-alignment/">Alignment</a></li>
<li><a href="http://www.vanseodesign.com/blog/web-design/design-basics-repetition/">Repetition</a></li>
<li><a href="http://www.vanseodesign.com/blog/web-design/design-basics-contrast/">Contrast</a></li>
<li><a href="http://www.vanseodesign.com/blog/web-design/design-basics-proximity/">Proximity</a></li>
</ul>
<p></p>
<p><a href="http://www.vanseodesign.com/blog/web-design/design-basics-proximity-to-know-what-belongs-with-what/">Design Basics: Proximity To Know What Belongs With What</a></p>

<p><a href="http://feedads.g.doubleclick.net/~a/1wmUEWX4m6xY-iNWjY7liIKzrrk/0/da"><img src="http://feedads.g.doubleclick.net/~a/1wmUEWX4m6xY-iNWjY7liIKzrrk/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/1wmUEWX4m6xY-iNWjY7liIKzrrk/1/da"><img src="http://feedads.g.doubleclick.net/~a/1wmUEWX4m6xY-iNWjY7liIKzrrk/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TheVanBlog?a=BJg6c3TGFW8:YFfVm7CqH5A:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/TheVanBlog?i=BJg6c3TGFW8:YFfVm7CqH5A:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheVanBlog?a=BJg6c3TGFW8:YFfVm7CqH5A:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/TheVanBlog?i=BJg6c3TGFW8:YFfVm7CqH5A:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheVanBlog?a=BJg6c3TGFW8:YFfVm7CqH5A:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheVanBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheVanBlog?a=BJg6c3TGFW8:YFfVm7CqH5A:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/TheVanBlog?i=BJg6c3TGFW8:YFfVm7CqH5A:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheVanBlog/~4/BJg6c3TGFW8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.vanseodesign.com/blog/web-design/design-basics-proximity-to-know-what-belongs-with-what/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.vanseodesign.com/blog/web-design/design-basics-proximity-to-know-what-belongs-with-what/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 1.525 seconds. --><!-- Cached page generated by WP-Super-Cache on 2009-07-09 16:25:13 -->
