<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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/"
	>

<channel>
	<title>Search-This &#187; Website Design</title>
	<atom:link href="http://www.search-this.com/category/website-design/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.search-this.com</link>
	<description>Internet Marketing, Website Promotion and Blogging Advice</description>
	<lastBuildDate>Mon, 01 Mar 2010 21:09:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>jQuery Enlightenment Review</title>
		<link>http://www.search-this.com/2010/01/14/jquery-enlightenment-review/</link>
		<comments>http://www.search-this.com/2010/01/14/jquery-enlightenment-review/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 15:44:28 +0000</pubDate>
		<dc:creator>Golgotha</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Website Design]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.search-this.com/?p=997</guid>
		<description><![CDATA[
Over the past month I have been reading jQuery Enlightenment by Cody Lindley. Let me say now, that if you use jQuery or are thinking about using jQuery then you should most certainly buy this book. It&#8217;s a quick read (122 pages) that includes colorized code samples, easy to follow examples and solid explanations.
Author Cody [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://jqueryenlightenment.com/"><img src="http://www.search-this.com/wp-content/uploads/2010/01/bookCover.png" alt="jQuery Enlightenment" title="bookCover" width="405" height="289" class="alignnone size-full wp-image-998" align="right" /></a></p>
<p>Over the past month I have been reading <strong>jQuery Enlightenment</strong> by Cody Lindley. Let me say now, that if you use jQuery or are thinking about using jQuery then you should most certainly <strong><a href="http://www.lulu.com/content/paperback-book/jquery-enlightenment/7640934">buy this book</a></strong>. It&#8217;s a quick read (122 pages) that includes colorized code samples, easy to follow examples and solid explanations.</p>
<p>Author Cody Lindley is a member of the jQuery team and explains why he wrote the book.</p>
<blockquote><p>
jQuery Enlightenment was written to express, in short-order, the concepts essential to intermediate and advanced jQuery development. Its purpose is to instill in you, the reader, practices that jQuery developers take as common knowledge. Each chapter contains concepts essential to becoming a seasoned jQuery developer.</p>
<p>This book is intended for three types of readers. The first is someone who has read introductory books on jQuery and is looking for the next logical step. The second type of reader is a JavaScript developer, already versed in another library, now trying to quickly learn jQuery. The third reader is myself, the author. I crafted this book to be used as my own personal reference point for jQuery concepts. This is exactly the type of book I wish every JavaScript library had available.
</p></blockquote>
<p>I would argue that this book is perfectly suitable for beginners too. It&#8217;s simply a must have jQuery book. It&#8217;s the only one you need; it will take you from beginner to competent user.</p>
<p>I do ASP.NET / C# web development where I build web-based software for school districts. My preferred architecture is one in which I use NO server-controls. That means no GridViews, no Repeaters, no ListViews. If fact, nothing that uses runat server will be found on the page. The page will only consist of XHTML. So there is no need for a viewstate either. We end up using jQuery a lot in this architecture. We use jQuery / Ajax to call Web services that then query the database using LINQ to SQL and pass our data back to the client where we can then populate our XHTML controls. It works great and is extremely fast and efficient. The code couldn&#8217;t be cleaner. In addition, this methodology would allow you to easily change to a PHP or Java backend and you wouldn&#8217;t have to change a single thing on the frontend. I will give a full example on this methodology another time, but the point is &#8211; you need to learn jQuery.</p>
<p>For more information on the jQuery Enlightenment book, including a breakdown of each chapter go <strong><a href="http://jqueryenlightenment.com/">here</a></strong>. I would recommend buying the full color book from lulu.com as it&#8217;s well designed and very handy to have on your desk.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.search-this.com/2010/01/14/jquery-enlightenment-review/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>CSS &#8211; A Sticky Subject</title>
		<link>http://www.search-this.com/2009/10/09/css-a-sticky-subject/</link>
		<comments>http://www.search-this.com/2009/10/09/css-a-sticky-subject/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 14:37:41 +0000</pubDate>
		<dc:creator>Paul OB</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Website Design]]></category>

		<guid isPermaLink="false">http://www.search-this.com/?p=970</guid>
		<description><![CDATA[CSS is a sticky subject in the best of times and to make it more sticky I thought I'd run down the techniques needed to make a sticky footer that works in all modern browsers. This is unlike most examples on the web that break in either Opera, IE8, IE7  or indeed in all [...]]]></description>
			<content:encoded><![CDATA[<p>CSS is a sticky subject in the best of times and to make it more sticky I thought I'd run down the techniques needed to <strong>make a sticky footer that works in all modern browsers</strong>. This is unlike <a href="http://www.google.co.uk/search?source=ig&#038;hl=en&#038;rlz=1G1GGLQ_ENUK317&#038;=&#038;q=CSS+Sticky+Footer+&#038;btnG=Google+Search&#038;meta=lr%3D&#038;aq=f&#038;oq="><strong>most examples on the web</strong></a> that break in either Opera, IE8, IE7  or indeed in all three.</p>
<p>Try any of those footers from the Google search above in IE8 or Opera (some don't work in IE7 either). Load the page then grab the bottom of the window (not the side or corner of the window) and drag it up or down and you will see that the footer usually sticks in the wrong place, messing up the display.</p>
<p>Now try it on <a href="http://www.pmob.co.uk/temp/3colfixedtest_4.htm"><strong>my old original sticky footer version</strong></a> (circa 2003 which pre-dates all those above) and you will see that my version is working in all browsers including IE8.</p>
<p>Before we get into details I should first explain what a sticky footer is.</p>
<p><strong><a href="http://www.pmob.co.uk/temp/sticky-footer-ie8new.htm">What is a Sticky Footer</a></strong></p>
<p>A sticky footer is one that sits at the bottom of the viewport when there is not enough content in the page to push the footer down. If there is a lot of content then the footer sits at the bottom of the document and will be below the fold as usual. Why this is desirable is because on short content pages you won't have a footer right at the top of the screen looking very strange indeed as shown from Figure 1 below.</p>
<p><strong>Figure 1</strong> - normal footer close to content.<br />
<img src="http://www.search-this.com/wp-content/uploads/2009/09/f1-300x84.png" alt="Normal footer" title="Normal footer" width="300" height="84" class="alignnone size-medium wp-image-973" /></p>
<p><strong>Figure 2</strong> - Sticky footer at bottom of viewport.<br />
<img src="http://www.search-this.com/wp-content/uploads/2009/09/f2-300x252.png" alt="f2" title="f2" width="300" height="252" class="alignnone size-medium wp-image-977" /></p>
<p>Note that a "<strong>fixed positioned</strong>" footer is not the same thing as a sticky footer as a fixed positioned footer is one that sits at the bottom of the viewport at all times and never moves. Don't get confused between the two.</p>
<p><strong>Overview</strong></p>
<p>Before we get into the nitty gritty detail I will briefly explain the concept in getting a sticky footer to work. </p>
<p>The first thing we need to do is create a 100% high container which is achieved by setting the html and body elements to 100% height and then creating a container that is a minimum of 100% high. The footer is then placed after this container which means it will be invisible as it will be below the fold of the page but by the magic of negative margins we can bring it back into view at the bottom of the viewport. </p>
<p>Of course this means that the sticky footer must be a fixed height (pixels or ems will do) so that we know how to accommodate it with the exact negative margins that bring it into view. This also means that our footer is now overlapping content on the page so we will also need to protect this content with either padding on an inner element, or some other similar approach as you will see when we get into specifics later.</p>
<p>That's basically all there is to it except that we have to squash a few bugs on the way to make it work everywhere.</p>
<p><strong>When to use a Sticky Footer</strong></p>
<p>Sticky footers are best suited for fixed width sites with small copyright messages and horizontal menu links that keep the footer at a relatively small size. The technique will work with a large height footer but the chances are that if you have a very large footer it will always reach the bottom anyway by the time you've got your header and content in place. It will also work with percentage width footers but remember that if the content in the footer is squeezed into making the footer higher than it was then the negative margin routine won't match any more and the layout will be misaligned slightly.</p>
<p><strong>Creating The Footer</strong></p>
<p>Now it's time to get your hands dirty with the code and I will break the method down in easy steps.</p>
<p>1) Create a 100% high wrapper to fill the viewport.</p>
<p>This is accomplished by removing the default margin and padding from the html and body elements and then setting a height of 100% so that our wrapper element can base its height on this. We then use min-height:100% on our page wrapper and not height:100% because our container would never grow otherwise but we will still need to address IE6 as it doesn't understand min-height at all. (If we didn't apply a height to html and body then our container would collapse to auto height and would not stretch to the bottom. The margins from html and body must also be removed because they would increase the height and thus ruin the effect as we want an exact 100% height only.)</p>
<div class="igBar"><span id="lcss-11"><a href="#" onclick="javascript:showPlainTxt('css-11'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CSS:</span>
<div id="css-11">
<div class="css">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">html, body <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">height</span>:<span style="color: #cc66cc;color:#800000;">100</span>%;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin</span>:<span style="color: #cc66cc;color:#800000;">0</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">padding</span>:<span style="color: #cc66cc;color:#800000;">0</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #cc00cc;">#outer <span style="color: #66cc66;">&#123;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">width</span>:760px;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">background</span>:#ffffcc;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin</span>:<span style="color: #993333;">auto</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; min-<span style="color: #000000; font-weight: bold;">height</span>:<span style="color: #cc66cc;color:#800000;">100</span>%;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">* html #outer<span style="color: #66cc66;">&#123;</span><span style="color: #000000; font-weight: bold;">height</span>:<span style="color: #cc66cc;color:#800000;">100</span>%<span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<div class="igBar"><span id="lhtml-12"><a href="#" onclick="javascript:showPlainTxt('html-12'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-12">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/body.html"><span style="color: #000000; font-weight: bold;">&lt;body&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">&lt;div</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"outer"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- all content apart from the footer must go inside this outer wrapper --&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">&lt;div</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"footer"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/body&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>As mentioned previously IE6 doesn't understand min-height therefore we provide a rule for IE6 only (using the <a href="http://reference.sitepoint.com/css/workaroundsfilters"><strong>star selector hack</strong></a> to target IE6 and under only) using the height property instead. We can do this because IE6 treats height as a minimum and will always expand an element to accommodate its content when overflow is set to visible (which is the default). We must also hide this height rule from other browsers because this would limit them to only an initial 100% and therefore the element would never expand with content.</p>
<blockquote><p>
Don't be tempted to use the !important hack to provide the height property to IE6 because the routine causes IE7 to be buggy with 100% height and won't resize the footer when the viewport is resized vertically.<br />
i.e.<strong> Do not do this:</strong></p>
<div class="igBar"><span id="lcss-13"><a href="#" onclick="javascript:showPlainTxt('css-13'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CSS:</span>
<div id="css-13">
<div class="css">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#outer<span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; min-<span style="color: #000000; font-weight: bold;">height</span>:<span style="color: #cc66cc;color:#800000;">100</span>%;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">height</span>:<span style="color: #993333;">auto</span>!important;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">height</span>:<span style="color: #cc66cc;color:#800000;">100</span>%;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><strong>Do not do this either:</strong></p>
<div class="igBar"><span id="lcss-14"><a href="#" onclick="javascript:showPlainTxt('css-14'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CSS:</span>
<div id="css-14">
<div class="css">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#outer<span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; min-<span style="color: #000000; font-weight: bold;">height</span>:<span style="color: #cc66cc;color:#800000;">100</span>%;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">height</span>:<span style="color: #cc66cc;color:#800000;">100</span>%;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">html&gt;body #outer<span style="color: #66cc66;">&#123;</span><span style="color: #000000; font-weight: bold;">height</span>:<span style="color: #993333;">auto</span><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Both the above <strong>will fail in IE7</strong> due to an obscure bug and should not be used in this routine.
</p></blockquote>
<p>The result of this code is that we now have a container that stretches to 100% height of the viewport quite nicely but the footer is sitting under this element and therefore under the fold of the page.</p>
<p>To bring the footer into view we first have to give it an appropriated height and then using a negative margin we drag it back into view. The negative margin can be applied in either of the following three methods.</p>
<p>1) A negative <strong>top margin</strong> on the footer itself<br />
2) A negative <strong>bottom margin </strong> on the main wrapper<br />
3) A negative <strong>top margin</strong> on the main wrapper</p>
<p>The first two methods are basically the same and just cause the footer to slip up over the bottom of the wrapper by the appropriate amount. <strong>Remember that the negative margins must match exactly the height of the footer.</strong> As a consequence of pulling the footer upwards it may indeed overwrite any content that was above it so you would also need to add some padding to the content above. The padding couldn't be added to the main wrapper because that means it would be too high and therefore the padding must be added to an inner element instead or just added to the element above the footer. </p>
<p>The third method mentioned above uses a slightly different tack in that the whole wrapper is moved upwards with a negative margin thus allowing the footer to fall into view at the bottom of the viewport but with the consequence that our wrapper now starts above the top of the viewport and out of sight. We therefore need to soak up this space on an inner element much the same as we did with the other two methods.</p>
<p>In 99% of cases you will most likely have a header element at the top of your page and you can use this element to soak up the extra space. My preferred method is to use a solid border on top of the header to do this because unlike padding it would not interfere with any absolutely positioned children should there be any.</p>
<p>Assuming our footer is 40px high the code to accomplish this is shown below:</p>
<div class="igBar"><span id="lcss-15"><a href="#" onclick="javascript:showPlainTxt('css-15'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CSS:</span>
<div id="css-15">
<div class="css">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #cc00cc;">#outer <span style="color: #66cc66;">&#123;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">width</span>:760px;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">background</span>:#ffffcc;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin</span>:<span style="color: #993333;">auto</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; min-<span style="color: #000000; font-weight: bold;">height</span>:<span style="color: #cc66cc;color:#800000;">100</span>%;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin-top</span>:-40px;<span style="color: #808080; font-style: italic;">/*footer height - this drags the outer 40px up through the top of the monitor */</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #cc00cc;">#header <span style="color: #66cc66;">&#123;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">width</span>:760px;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">background</span>:<span style="color: #993333;">red</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; border-top<span style="color: #3333ff;">:40px </span>solid #fff; <span style="color: #808080; font-style: italic;">/* soak up negative margin and allows header to start at top of page*/</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>The top border soaks up the space that is above the viewport and allows content to start in the viewport where it should be. This is exactly what we wanted and is  quite a slick way to do this as we no longer need to worry about any overlap of the footer.</p>
<p>To make it easier to follow here is the code so far:</p>
<div class="igBar"><span id="lhtml-16"><a href="#" onclick="javascript:showPlainTxt('html-16'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-16">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #00bbdd;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/html.html"><span style="color: #000000; font-weight: bold;">&lt;html</span></a> xmlns=<span style="color: #ff0000;">"http://www.w3.org/1999/xhtml"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/head.html"><span style="color: #000000; font-weight: bold;">&lt;head&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/meta.html"><span style="color: #000000; font-weight: bold;">&lt;meta</span></a> <span style="color: #000066;">http-equiv</span>=<span style="color: #ff0000;">"Content-Type"</span> <span style="color: #000066;">content</span>=<span style="color: #ff0000;">"text/html; charset=iso-8859-1"</span> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/title.html"><span style="color: #000000; font-weight: bold;">&lt;title&gt;</span></a></span>Sticky Footer at Bottom<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/title&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/style.html"><span style="color: #000000; font-weight: bold;">&lt;style</span></a> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"text/css"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">* {/* for demo only*/</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; margin:0;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; padding:0</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">}</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">html, body {</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; height:100%;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">}</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#outer {</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; width:760px;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; background:#ffffcc;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; margin:auto;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; min-height:100%;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; margin-top:-40px;/*footer height - this drags the outer 40px up through the top of the monitor */</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">}</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">* html #outer {</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; height:100%</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">}</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#header {</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; width:760px;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; background:red;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; border-top:40px solid #fff; /* soak up negative margin and allows header to start at top of page*/</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">}</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#footer {/* footer now sits at bottom of window*/</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; background:red;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; width:760px;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; margin:auto;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; height:40px;/* must match negative margin of #outer */</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; clear:both;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">}</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/style&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/head&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/body.html"><span style="color: #000000; font-weight: bold;">&lt;body&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">&lt;div</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"outer"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">&lt;div</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"header"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/h1.html"><span style="color: #000000; font-weight: bold;">&lt;h1&gt;</span></a></span>Header<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/h1&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">&lt;p&gt;</span></a></span>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam mattis tempor imperdiet. Morbi elit dolor, aliquam ut sagittis id, aliquam et tortor. Phasellus vitae suscipit dolor. Fusce euismod leo quis magna varius a feugiat elit aliquam. Suspendisse nec libero tellus. Nam quis libero vel sapien ultrices fermentum id vel sem. Duis massa neque, laoreet at viverra scelerisque, malesuada id nunc. Quisque turpis mi, commodo ac commodo vitae, accumsan eget nibh. Fusce sit amet leo sodales orci porta tempor. Donec nec mollis libero. Aenean porttitor placerat pretium. In hac habitasse platea dictumst. Nam vel dignissim turpis. Aenean facilisis purus nec nisi egestas at scelerisque tellus lobortis. Praesent vitae neque est. Fusce lacinia lectus sed urna suscipit blandit. Vestibulum sed euismod tortor. Sed vel neque nisl. Nunc aliquam feugiat egestas. <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">&lt;div</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"footer"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">&lt;p&gt;</span></a></span>Footer<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/body&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/html&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>With the code shown we are very close to have a working footer and indeed the code above will work in IE6/7 and Firefox with no problems. Try out the above and see for yourself.</p>
<p>The problem with the above code is that it doesn't work properly in IE8 or in Opera. If, as already mentioned, you move the window by grabbing the bottom of the viewport (not the side or the corner) then the footer becomes mis-positioned or doesn't move at all.</p>
<p>This is the behavior seen in all other sticky footers but it doesn't occur in my original demo. The clue to why my old demo is still working will provide us with a neat solution that can be wrapped into this specific footer routine.</p>
<p>Back in 2003 not many browsers understood min-height and to accommodate these browsers I used a min-height hack which was basically a 100% high float that was 1px (or even 0px) wide. This held the browser open to the initial 100% height quite nicely without affecting much else as long as we took clear of clearing issues. The 100% height float triggered opera into resizing the page correctly once the viewport was moved and caused the footer to be drawn into the correct position.</p>
<p>Today (and thanks to the <a href="http://www.sitepoint.com/forums/showthread.php?t=611825">quiz I set at sitepoint</a>) we can apply that 100% float using the  pseudo element "<a href="http://reference.sitepoint.com/css/pseudoelement-before">:before</a>" and negate the need for any extra html mark up at all.</p>
<div class="igBar"><span id="lcss-17"><a href="#" onclick="javascript:showPlainTxt('css-17'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CSS:</span>
<div id="css-17">
<div class="css">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">body<span style="color: #3333ff;">:before </span><span style="color: #66cc66;">&#123;</span><span style="color: #808080; font-style: italic;">/* thanks to Maleika (Kohoutec)*/</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">content</span>:<span style="color: #ff0000;">""</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">height</span>:<span style="color: #cc66cc;color:#800000;">100</span>%;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">float</span>:<span style="color: #000000; font-weight: bold;">left</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">width</span>:<span style="color: #cc66cc;color:#800000;">0</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin-top</span>:-32767px;<span style="color: #808080; font-style: italic;">/* thank you Erik J - negate effect of float*/</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>The code above places a 100% high float that has no width as the first element on the page. This enables Opera to resize nicely and keep the footer where it should be. To negate any possible clearing issues on normal page content we use a negative top margin to pull the float high above the viewport (32767px is Opera's limit so don't use any more than this). Even with the negative margin applied Opera still continues to resize the page nicely.</p>
<p><strong>IE8</strong></p>
<p>The last browser to address is IE8 as it won't play ball with this method although it does understand the pseudo element :before, it doesn't apply the 100% height to it as required. Therefore we need another fix and again the answer is quite simple and logical and we supply IE8 with <strong>height:100%</strong> but declare the element as <a href="http://reference.sitepoint.com/css/display">display:table</a>.  This will enable the element to be 100% high initially but also to expand if content dictates which is exactly the way that tables work.</p>
<p>As IE8 is the only one that needs this rule we will use <a href="http://reference.sitepoint.com/css/conditionalcomments">conditional comments</a> to supply this rule to it. In order to tidy up we can also remove the IE6 hack we added earlier and put it in the conditional comments as shown below.</p>
<div class="igBar"><span id="lcss-18"><a href="#" onclick="javascript:showPlainTxt('css-18'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CSS:</span>
<div id="css-18">
<div class="css">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;!--<span style="color: #66cc66;">&#91;</span>if <span style="color: #66cc66;">&#40;</span>lte IE <span style="color: #cc66cc;color:#800000;">6</span><span style="color: #66cc66;">&#41;</span>|<span style="color: #66cc66;">&#40;</span>gte IE <span style="color: #cc66cc;color:#800000;">8</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;style type=<span style="color: #ff0000;">"text/css"</span>&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #cc00cc;">#outer <span style="color: #66cc66;">&#123;</span></span>height:<span style="color: #cc66cc;color:#800000;">100</span>%;display:table;<span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/style&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;!<span style="color: #66cc66;">&#91;</span>endif<span style="color: #66cc66;">&#93;</span>--&gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>If you are not familiar with the first line of the conditional comments shown above then in English it basically says "<strong>If less than or equal to IE6 <strong>or</strong> If greater than or equal to IE8 then use the code below</strong>".</p>
<p>As IE6 doesn't understand display:table then it is simply ignored by IE6 and it gets the height:100% rule only. IE8 on the other hand understands both and gets both just as it needed. This saves using two sets of conditional comments and keeps the page nice and tidy.</p>
<p>Here is the full code with comments to make it easier to understand or you can view source from the <a href="http://www.pmob.co.uk/temp/sticky-footer-ie8new.htm"> <strong>Full live version</strong></a>.<br />
<strong>Full Code</strong></p>
<div class="igBar"><span id="lhtml-19"><a href="#" onclick="javascript:showPlainTxt('html-19'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-19">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #00bbdd;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/html.html"><span style="color: #000000; font-weight: bold;">&lt;html</span></a> xmlns=<span style="color: #ff0000;">"http://www.w3.org/1999/xhtml"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/head.html"><span style="color: #000000; font-weight: bold;">&lt;head&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/meta.html"><span style="color: #000000; font-weight: bold;">&lt;meta</span></a> <span style="color: #000066;">http-equiv</span>=<span style="color: #ff0000;">"Content-Type"</span> <span style="color: #000066;">content</span>=<span style="color: #ff0000;">"text/html; charset=iso-8859-1"</span> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/title.html"><span style="color: #000000; font-weight: bold;">&lt;title&gt;</span></a></span>Sticky Footer at Bottom<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/title&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/style.html"><span style="color: #000000; font-weight: bold;">&lt;style</span></a> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"text/css"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">* {/* for demo only*/</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; margin:0;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; padding:0</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">}</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">html, body {</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; height:100%;/* needed to base 100% height on something known*/</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">}</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#outer {</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; width:760px;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; background:#ffffcc;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; margin:auto;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; min-height:100%;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; margin-top:-40px;/*footer height - this drags the outer 40px up through the top of the monitor */</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">}</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#header {</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; background:red;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; border-top:40px solid #fff; /* soak up negative margin and allows header to start at top of page*/</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">}</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#footer {/* footer now sits at bottom of window*/</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; background:red;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; width:760px;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; margin:auto;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; height:40px;/* must match negative margin of #outer */</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; clear:both;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">}</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">/*Opera Fix*/</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">body:before {/* thanks to Maleika (Kohoutec)*/</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; content:&quot;&quot;;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; height:100%;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; float:left;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; width:0;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; margin-top:-32767px;/* thank you Erik J - negate effect of float*/</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">}</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">h1,h2,p{padding:0 10px;}</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/style&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!--[if (lte IE 6)|(gte IE 8)]&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/style.html"><span style="color: #000000; font-weight: bold;">&lt;style</span></a> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"text/css"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#outer {height:100%;display:table;}</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/style&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;</span></a>!<span style="color: #66cc66;">&#91;</span>endif<span style="color: #66cc66;">&#93;</span>--<span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/head&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/body.html"><span style="color: #000000; font-weight: bold;">&lt;body&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">&lt;div</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"outer"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">&lt;div</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"header"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/h1.html"><span style="color: #000000; font-weight: bold;">&lt;h1&gt;</span></a></span>Sticky Footer<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/h1&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/h2.html"><span style="color: #000000; font-weight: bold;">&lt;h2&gt;</span></a></span>Ultimate Sticky footer that works in ie5/6/7/8, Opera 9 and 10, Firefox 2+, Chrome, Safari 3+ (and probably every other modern browser)<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/h2&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">&lt;p&gt;</span></a></span>test<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">&lt;p</span></a> <span style="color: #000066;">style</span>=<span style="color: #ff0000;">"clear:both"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>Element with clear:both added<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">&lt;p&gt;</span></a></span>test<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">&lt;p&gt;</span></a></span>test<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">&lt;div</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"footer"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #009900;"><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">&lt;p&gt;</span></a></span>Footer<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p&gt;</span></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/body&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/html&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Just in case you are thinking that there is too much code overhead in this if we look at the html needed you will see that there aren't really any extra elements (apart from assuming that you have a header in the page.) The minimum html is as follows.</p>
<div class="igBar"><span id="lhtml-20"><a href="#" onclick="javascript:showPlainTxt('html-20'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-20">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">&lt;div</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"outer"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">&lt;div</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"header"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span> <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">&lt;p&gt;</span></a></span>test<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">&lt;div</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"footer"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span> <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>I don't think you can get neater than that!</p>
<p>Although I have shown the example in a fixed-width format you can use it in a percentage or fluid width page as long as you take care with the footer dimensions and don't let the footer height increase with content. To enable text-resizing you could size the footer and negative margins using ems but that would assume you were basing them on the same font-size, etc.</p>
<p><strong>Things to watch out for</strong></p>
<p>Remember to take into account the effect of <a href="http://reference.sitepoint.com/css/collapsingmargins">collapsing margins</a> on the first and last elements in the wrapper because these may have an impact on the position of the parent or the position of the footer.</p>
<p>I also often see problems where authors have tried to make space at the top and bottom of the page by simply moving the wrapper down the page. The result of this is it moves the whole 100% down the page and ruins the effect. Everything has to happen in the 100% high wrapper and if you want space at the top then you would need to reduce the space at the bottom or be creative in other ways.</p>
<p>Here are just a few various examples.<br />
<a href="http://www.pmob.co.uk/temp/sticky-footer-ie8new.htm">Main Version</a><br />
<a href="http://www.pmob.co.uk/temp/100-with-rightbar.htm">Example 1</a><br />
<a href="http://www.pmob.co.uk/temp/graphical-footer.htm">Example 2</a><br />
<a href="http://www.pmob.co.uk/temp/3col-sticky-footer-min-max2.htm">Example 3</a><br />
<a href="http://www.pmob.co.uk/temp/sticky-f.htm">Example 4</a></p>
<p>I hope you have enjoyed this article and if you have any questions then post away and I'll try my best to answer them.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.search-this.com/2009/10/09/css-a-sticky-subject/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Lijit&#8217;s Integration with WordPress</title>
		<link>http://www.search-this.com/2008/11/03/lijits-integration-with-wordpress/</link>
		<comments>http://www.search-this.com/2008/11/03/lijits-integration-with-wordpress/#comments</comments>
		<pubDate>Mon, 03 Nov 2008 17:54:46 +0000</pubDate>
		<dc:creator>Golgotha</dc:creator>
				<category><![CDATA[Website Design]]></category>
		<category><![CDATA[Website Tools]]></category>
		<category><![CDATA[lijit]]></category>

		<guid isPermaLink="false">http://www.search-this.com/?p=732</guid>
		<description><![CDATA[
I spoke to you back in January about Lijit. Remember I showed you that Lijit allows you to easily create your own search engine. One that searches your blog, bookmarks, photos, blogroll, and more. 
I really liked Lijit then but I was disappointed that I couldn't integrate the Lijit search functionality into WordPress. That is [...]]]></description>
			<content:encoded><![CDATA[<p><img src='http://www.search-this.com/wp-content/uploads/2007/12/lijit.png' alt='lijit.png' align='left' style='padding-right:10px' width='179' height='128' /></p>
<p>I spoke to you back in January about <a href="http://www.search-this.com/2008/01/02/lijit-is-cool/">Lijit</a>. Remember I showed you that Lijit allows you to easily create your own search engine. One that searches your blog, bookmarks, photos, blogroll, and more. </p>
<p>I really liked Lijit then but I was disappointed that I couldn't integrate the Lijit search functionality into WordPress. That is let Lijit take over my search box that was already there and is ALREADY there in just about every other blog too. Instead you had to put a widget on your page. I felt like this was such a mistake I actually went to visit Lijit in Boulder and told them so. Well I'm happy to say that they have listened and now allow you to let their search take over your search box. Here's what they say:</p>
<blockquote><p>Lijit's integration with WordPress.org just keeps getting better! Now you can either install the Lijit Search widget OR have Lijit power your existing WordPress search box. As if that weren’t exciting enough, our Lijit stats will automatically display within your WordPress dashboard for one-stop stats viewing too.
</p></blockquote>
<p>Go ahead and have a look, try the search located in the top left corner....</p>
<p>If you like it you can find the <a href="http://wordpress.org/extend/plugins/wp-lijit-wijit/">Lijit WordPress plugin here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.search-this.com/2008/11/03/lijits-integration-with-wordpress/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>My Favorite Geek Books of 2008</title>
		<link>http://www.search-this.com/2008/10/01/my-favorite-geek-books-of-2008/</link>
		<comments>http://www.search-this.com/2008/10/01/my-favorite-geek-books-of-2008/#comments</comments>
		<pubDate>Wed, 01 Oct 2008 14:05:24 +0000</pubDate>
		<dc:creator>Golgotha</dc:creator>
				<category><![CDATA[Website Design]]></category>
		<category><![CDATA[Website Tools]]></category>
		<category><![CDATA[books]]></category>

		<guid isPermaLink="false">http://www.search-this.com/?p=724</guid>
		<description><![CDATA[
The above photo is my stack of geek books from last Christmas. Yes, I love books -- I love the way they smell, thumbing through the pages and oh yes, the wisdom they bestow. I admit, often times I don't make it through the entire book. Sometimes just a handful of chapters. But every now [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.search-this.com/wp-content/uploads/2008/09/books1.jpg" alt="" title="books" width="424" height="318" class="alignnone size-full wp-image-730" /></p>
<p>The above photo is my stack of geek books from last Christmas. Yes, I love books -- I love the way they smell, thumbing through the pages and oh yes, the wisdom they bestow. I admit, often times I don't make it through the entire book. Sometimes just a handful of chapters. But every now and then you come across some great books that are gems. So I thought I would share a few of my favorite books from this year.</p>
<p><img src="http://www.search-this.com/wp-content/uploads/2008/09/c.jpg" alt="Head First C#" title="Head First C#" width="240" height="240" style="padding-right:7px; float:left"  /></p>
<h3>Head First C#</h3>
<p>Each morning before work I stop and enjoy a latte or cappuccino. This is my book of choice to read while sipping down my caffeine kick-start. That's because it's not like your typical code book which can be pretty dry. This book is very visual, full of pictures and diagrams that help to illustrate and drive home key points. Often times it finishes the chapter with a crossword puzzle helping you to retain the points of the chapter. In fact those crossword puzzles inspired <a href="http://www.search-this.com/2008/02/06/web-developer-crossword-puzzle/"><strong>this post</strong></a>. It's a great read for beginners and advanced users alike. </p>
<div class="clearfix"></div>
<p><img src="http://www.search-this.com/wp-content/uploads/2008/09/actionscript.jpg" alt="Object-Oriented ActionScript 3.0" title="Object-Oriented ActionScript 3.0" width="200" height="240"  style="padding:7px; float:right;" /></p>
<h3>Object-Oriented ActionScript 3.0</h3>
<p>If you are just starting to learn Flash or Flex or ActionScript then this is the book for you. Actually, even if you are a seasoned pro this is still the book for you. Why? Because it teaches you the correct way to do things. It teaches you true object oriented programming in ActionScript. With topics like: Encapsulation, Classes, Inheritance, Polymorphism, Interfaces, and Design Patterns you will not only learn ActionScript, but also principles of OOP. If you wish to learn proper Flash/Flex development then this book is for you.</p>
<div class="clearfix"></div>
<p><img src="http://www.search-this.com/wp-content/uploads/2008/09/aspnet.png" alt="The ASP.NET Anthology" title="The ASP.NET Anthology" width="178" height="229" style="float:left; padding:7px;" /></p>
<h3>The ASP.NET Anthology</h3>
<p>This book takes a problem solving approach to a handful of common everyday ASP.NET developer needs. Things like: form validation, membership and access control, working with email, rendering binary content, Ajax, handling errors and more. <a href="http://www.sitepoint.com/books/aspnetant1/?SID=76476f7d4aaa973e90c06459d01fd08c">Sitepoint</a> says this about the book, which I agree with: "Solve specific ASP.NET problems fast — without wading through mountains of reference material — and rest assured your code follows current best practices.  For the serious ASP.NET coder, this book is a must-have."</p>
<div class="clearfix"></div>
<p><img src="http://www.search-this.com/wp-content/uploads/2008/09/css.png" alt="The Ultimate CSS Reference" title="The Ultimate CSS Reference" width="170" height="210" style="float:right; padding:7px;" /></p>
<h3>The Ultimate CSS Reference</h3>
<p>Perhaps the last CSS book you'll ever need. Written by our very own Paul O'Brien whom regulars to Search-This will know does an amazing job making sense of often tricky, finicky or strange CSS behaviors. Almost every web site created today is built using CSS, which is why a thorough knowledge of this technology is mandatory for every web designer. There are plenty of good resources to help you learn the basics, but if you’re ready to truly master the intricacies of CSS, this is the book you need.</p>
<div class="clearfix"></div>
<p><img src="http://www.search-this.com/wp-content/uploads/2008/09/asp.png" alt="ASP.NET 3.5 Unleashed" title="ASP.NET 3.5 Unleashed" width="175" height="229" style="float:left; padding:7px;" /></p>
<h3>ASP.NET 3.5 Unleashed</h3>
<p>Make no mistake about it, this is a reference book at almost 2,000 pages. But it may be the best ASP.NET reference book on the market. It covers <em>everything</em>: LINQ to SQL, ASP.NET AJAX, ListView and DataPager data access controls and all the rest. What's especially nice is that you can tell the author, Stephen Walther, has spent time in the trenches. He knows best practices, like using CSS for all his layout work and having well-formed cross-browser friendly code all the while teaching you ASP.NET 3.5. This is a must-have book for all ASP.NET developers.</p>
<div class="clearfix"></div>
<p>Well there you have it, five of my favorite geek books of 2008. <strong>Do you have a book that you read this year that you thought was a gem?</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.search-this.com/2008/10/01/my-favorite-geek-books-of-2008/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>IDing the Problem of ASP.NET</title>
		<link>http://www.search-this.com/2008/08/20/iding-the-problem-of-aspnet/</link>
		<comments>http://www.search-this.com/2008/08/20/iding-the-problem-of-aspnet/#comments</comments>
		<pubDate>Wed, 20 Aug 2008 13:59:37 +0000</pubDate>
		<dc:creator>Golgotha</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Website Design]]></category>
		<category><![CDATA[ASP.NET]]></category>

		<guid isPermaLink="false">http://www.search-this.com/?p=714</guid>
		<description><![CDATA[I love ASP.NET, but one thing I find extremely frustrating is dealing with the automatically generated ID properties that it places on page elements.
For example, let's say you have a div with an id of "contentTop" like below:
PLAIN TEXT
HTML:




&#60;div id="contentTop" runat="server"&#62;...&#60;/div&#62; 






Because you have made the control a server-side control by adding the runat="server" attribute [...]]]></description>
			<content:encoded><![CDATA[<p>I love ASP.NET, but one thing I find extremely frustrating is dealing with the automatically generated ID properties that it places on page elements.</p>
<p>For example, let's say you have a div with an id of "contentTop" like below:</p>
<div class="igBar"><span id="lhtml-26"><a href="#" onclick="javascript:showPlainTxt('html-26'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-26">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">&lt;div</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"contentTop"</span> runat=<span style="color: #ff0000;">"server"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>...<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Because you have made the control a server-side control by adding the <strong>runat="server"</strong> attribute it will now be rendered with a different ID when it hits the browser (view the source code and you will see). It will get rendered as something like this:</p>
<div class="igBar"><span id="lhtml-27"><a href="#" onclick="javascript:showPlainTxt('html-27'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-27">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">&lt;div</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"ctl00_contentTop"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>...<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>This is because ASP.NET generates its own IDs to ensure that every element on the page has a unique ID. Developers that work with JavaScript and CSS will immediately see the problem. This causes difficulty when using JavaScript and CSS which rely on those IDs to reference elements, as they can't easily predict what the generated ID will be. When it comes to  <a href="http://www.stuffandnonsense.co.uk/archives/css_specificity_wars.html">CSS specificity</a> the ID selector is extremely useful. In addition, anyone that uses JavaScript knows that <strong>getElementById</strong> (or one of the JavaScript library ways) is the most popular way to target an element. So why the hell does ASP.NET do this to us? Honestly, I can't really tell why, other than the fact that they must not trust us enough to be able to uniquely ID our elements ourselves. </p>
<p>But I don't want to just complain here, I would like to provide some solutions too.</p>
<h2>Solution</h2>
<p>The solution will be found in the <strong>ClientID </strong>property of the server-side control. The ClientID property represents the ID that ASP.NET will use for the element on the client.</p>
<p>Using the <strong>ScriptManager</strong> we place the ClientID in a hidden form field. This can all be done in the code-behind file by using the following code:</p>
<div class="igBar"><span id="lcsharp-28"><a href="#" onclick="javascript:showPlainTxt('csharp-28'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">C#:</span>
<div id="csharp-28">
<div class="csharp">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">ScriptManager.<span style="color: #0000FF;">RegisterHiddenField</span><span style="color: #000000;">&#40;</span><span style="color: #0600FF;">this</span>, <span style="color: #808080;">"contentTop"</span>, contentTop.<span style="color: #0000FF;">ClientID</span><span style="color: #000000;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Be sure to have included the ScriptManager to your page, like so:</p>
<div class="igBar"><span id="lasp-29"><a href="#" onclick="javascript:showPlainTxt('asp-29'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ASP:</span>
<div id="asp-29">
<div class="asp">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;asp:ScriptManager ID=<span style="color:#CC0000;">"ScriptManager1"</span> runat=<span style="color:#CC0000;">"server"</span>&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;/asp:ScriptManager&gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Now we can use JavaScript to retrieve the value from our hidden form fields.</p>
<div class="igBar"><span id="ljavascript-30"><a href="#" onclick="javascript:showPlainTxt('javascript-30'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
<div id="javascript-30">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">var</span> id = form1.<span style="color: #006600;">contentTop</span>.<span style="color: #006600;">value</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">var</span> cTop = document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'id'</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>That's it, if you know of another way, please let us know.<br />
Happy coding.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.search-this.com/2008/08/20/iding-the-problem-of-aspnet/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>My CSS is Cat -(Categories With CSS)</title>
		<link>http://www.search-this.com/2008/08/13/my-css-is-cat-categories-with-css/</link>
		<comments>http://www.search-this.com/2008/08/13/my-css-is-cat-categories-with-css/#comments</comments>
		<pubDate>Wed, 13 Aug 2008 14:10:08 +0000</pubDate>
		<dc:creator>Paul OB</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Website Design]]></category>

		<guid isPermaLink="false">http://www.search-this.com/?p=706</guid>
		<description><![CDATA[This article details how to produce a product category list with associated images and text. This is the sort of thing you would see if you did a search on Amazon.
I am going to start by showing the finished product as this will help you visualize what we are going to achieve along the way. [...]]]></description>
			<content:encoded><![CDATA[<p>This article details how to produce a product category list with associated images and text. This is the sort of thing you would see if you did a <a href="http://www.amazon.com/s/ref=nb_ss_b?url=search-alias%3Dstripbooks&#038;field-keywords=Cascading+Style+Sheets+Reference+sitepoint&#038;x=0&#038;y=0">search on Amazon</a>.</p>
<p>I am going to start by showing the <a href="http://www.pmob.co.uk/search-this/definition-list3.htm"><strong>finished product</strong></a> as this will help you visualize what we are going to achieve along the way. Figure 1 below shows a smaller version of the task ahead.</p>
<p><strong>Figure 1</strong><br />
<img src="http://www.search-this.com/wp-content/uploads/2008/08/cat-fig1.png" alt="" title="cat-fig1" width="350" height="360" class="alignnone size-full wp-image-707" /></p>
<p>We are going to make a similar display but without using tables as in my view the information presented is not tabular and does not have a logical correspondence between rows and columns. Even if you do present a good case of why this should be in a table, please don't comment on this as we are interested in the layout techniques rather than perfect semantics (for this example). The techniques presented here can be used in other layouts that are certainly not tabular and will prove useful in many situations.</p>
<p><strong>Define Your Content</strong></p>
<p>The first thing we need to do is decide what elements we are going to use to style this category <strong>list</strong>. That's your first clue - we should already be thinking about using a list to do this. However, I feel that information like this is more suited to a definition list (DL) as the product name is the data term (DT) and the description underneath is the data definition (DD). (Feel free to disagree but whatever method you choose the techniques used to construct our layout will likely be the same.)</p>
<p>I'm using a Definition List which will allow us to semantically describe the heading and the associated text that describes the heading.</p>
<p>Although definitions have default styling applied, such as margins, we can simply get rid of that using one of the many reset techniques available. I am using a global reset for purposes of the demo but I suggest you look into more <a href="http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/">thorough methods</a>.</p>
<p>Lets' start by thinking about what we want to achieve.</p>
<p>The image needs to be at the left of the layout and the text needs to be lined up nicely alongside the image but we don't want the image to wrap underneath the image as that looks a little messy in a list like this.<br />
e.g. Not like this:<br />
<strong>Figure 2</strong><br />
<a href='http://www.search-this.com/wp-content/uploads/2008/08/cat-fig2.png'><img src="http://www.search-this.com/wp-content/uploads/2008/08/cat-fig2.png" alt="" title="cat-fig2" width="350" height="73" class="alignnone size-full wp-image-708" /></a></p>
<p>As you can see the last line of text wraps under the image rather spoiling the effect so we will look at how to overcome this problem without complicating the issue too much.</p>
<p>The image can be floated to the left and we can apply a right margin to push the text away at the side. So for a start we will do just that and see what our display looks like.</p>
<p><strong>HTML</strong></p>
<div class="igBar"><span id="lhtml-36"><a href="#" onclick="javascript:showPlainTxt('html-36'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-36">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/dl.html"><span style="color: #000000; font-weight: bold;">&lt;dl&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/dt.html"><span style="color: #000000; font-weight: bold;">&lt;dt&gt;</span></a></span><span style="color: #009900;"><a href="http://december.com/html/4/element/img.html"><span style="color: #000000; font-weight: bold;">&lt;img</span></a> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">"images/product.jpg"</span> <span style="color: #000066;">alt</span>=<span style="color: #ff0000;">"Product image"</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">"93"</span> <span style="color: #000066;">height</span>=<span style="color: #ff0000;">"62"</span> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #009900;"><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">&lt;a</span></a> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">"#"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>The Name of the Product Goes here<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a&gt;</span></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dt&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/dd.html"><span style="color: #000000; font-weight: bold;">&lt;dd&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">&lt;p&gt;</span></a></span>The description of whatever the heading is about goes here. The description of whatever the heading is about goes here.The description of whatever the heading is about goes here. The description of whatever the heading is about goes here. The description of whatever the heading is about goes here.The description of whatever the heading is about goes here.<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dd&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dl&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><strong>CSS:</strong></p>
<div class="igBar"><span id="lcss-37"><a href="#" onclick="javascript:showPlainTxt('css-37'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CSS:</span>
<div id="css-37">
<div class="css">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">*<span style="color: #66cc66;">&#123;</span><span style="color: #000000; font-weight: bold;">margin</span>:<span style="color: #cc66cc;color:#800000;">0</span>;padding:<span style="color: #cc66cc;color:#800000;">0</span><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">p<span style="color: #66cc66;">&#123;</span>margin<span style="color: #3333ff;">:<span style="color: #cc66cc;color:#800000;">0</span> </span><span style="color: #cc66cc;color:#800000;">0</span> <span style="color: #6666ff;">.5em </span><span style="color: #cc66cc;color:#800000;">0</span><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">dl<span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">width</span>:640px;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; margin<span style="color: #3333ff;">:<span style="color: #cc66cc;color:#800000;">0</span> </span>auto;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; border-bottom<span style="color: #3333ff;">:1px </span>dashed #ccc;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">padding</span>:10px;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">overflow</span>:<span style="color: #993333;">hidden</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">background</span>:#f2f2f2;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">dl img<span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">float</span>:<span style="color: #000000; font-weight: bold;">left</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; margin<span style="color: #3333ff;">:<span style="color: #cc66cc;color:#800000;">0</span> </span>10px <span style="color: #cc66cc;color:#800000;">0</span> <span style="color: #cc66cc;color:#800000;">0</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; border<span style="color: #3333ff;">:1px </span>solid #000;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>If you run the above small code sample you will see a display almost exactly as that shown in Figure 2 above. The image is floated nicely to the left and the text wraps to the right side of the image except that the last line wraps under the image. </p>
<p>We will address that issue in a moment but it's important to mention at this stage that floats are removed from the flow and if you want them to stay inside your container you must use some sort of clearing mechanism. Otherwise the float will float out of the container and poke into the container below should content be less than the height of the image.</p>
<p>In our example I have added overflow:hidden to the <em>dl</em> container which will ensure that all floats are contained within. Overflow other than <em>visible</em> will cause elements to contain their floated children in most modern browsers. IE6 needs "haslayout" to be true and then it will auto clear floats also. This can be achieved by setting a dimension which we already have in place so no extra hacks are required. Overflow isn't always the most suitable clearing mechanism to use but in simple layouts it works well but you should investigate <a href="http://www.google.co.uk/search?hl=en&#038;rlz=1G1GGLQ_ENUK255&#038;sa=X&#038;oi=spell&#038;resnum=0&#038;ct=result&#038;cd=1&#038;q=clearing+floats+without+structural+markup&#038;spell=1">other clearing techniques </a>also.</p>
<p>Additionally, note that I have placed the image inside the <em>dt</em> element because the product image and it's title are really the same thing.</p>
<p><strong>Stopping The Text From Wrapping</strong></p>
<p>Usually authors would apply a left margin to the text content to make it steer clear of the image but this is not the best solution for three main reasons:</p>
<p>1) Firstly your images may be supplied dynamically and be of varying widths and therefore your left margin approach would fail unless you set a width wider than all the images. </p>
<p>2) The second problem would be that IE6 has a "<a href="http://www.sitepoint.com/forums/showpost.php?p=1374925&#038;postcount=15">3px jog</a>" on static content next to a float and would make the display look slightly odd. Sometimes this is barely noticeable but it can still be annoying.</p>
<p>3) Lastly and more importantly, if you have floated content mixed in your content description section and you try to clear them you will end up clearing all floats and the whole description drops below the float. Figure 3 shows an example of this.</p>
<p><strong>Figure 3</strong><br />
<a href='http://www.search-this.com/wp-content/uploads/2008/08/cat-fig3.png'><img src="http://www.search-this.com/wp-content/uploads/2008/08/cat-fig3.png" alt="" title="cat-fig3" width="350" height="102" class="alignnone size-full wp-image-709" /></a><br />
(Example shows what happens when a float (the red box) is cleared)</p>
<p>Luckily there is a simple method we can turn to that cures all these problems quite easily. (As an aside this method was also  exploited earlier in one of <a href="http://www.search-this.com/2007/11/12/two-column-layout-with-a-twist/">John's Article</a>s.) If we once again use <em><a href="http://reference.sitepoint.com/css/overflow">overflow </a></em> other than <em>visible</em> on this content we can make it form a rectangular box to the side of the image and also honoring the image's margins. It's almost as if we have floated another block to the side except that we haven't.</p>
<p>The <em>overflow:auto</em>  (or overflow:hidden) causes the element to form a rectangular block that will not only stay at the side of the floated image but will also contain any floated children. As another bonus It will also contain the effect of any clearing of floats in that section. Float clearing from within that <em>overflow:auto</em> container will be restricted to that container only and not just clear all floats above in the HTML as per usual.</p>
<p>The overflow method doesn't work in IE6 but fortunately forcing "haslayout" on the element concerned has exactly the same effects and with an added bonus of partially curing the "3px jog" mentioned earlier. As we don't want a dimension in this container we can use the height:1% hack supplied via the star selector hack to target IE6 and under only.</p>
<div class="igBar"><span id="lcss-38"><a href="#" onclick="javascript:showPlainTxt('css-38'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CSS:</span>
<div id="css-38">
<div class="css">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">* html dd<span style="color: #66cc66;">&#123;</span><span style="color: #000000; font-weight: bold;">height</span>:<span style="color: #cc66cc;color:#800000;">1</span>%<span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Therefore all we need to add to the CSS already shown is this:</p>
<div class="igBar"><span id="lcss-39"><a href="#" onclick="javascript:showPlainTxt('css-39'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CSS:</span>
<div id="css-39">
<div class="css">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">dd<span style="color: #66cc66;">&#123;</span><span style="color: #000000; font-weight: bold;">overflow</span>:<span style="color: #993333;">auto</span><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">* html dd <span style="color: #66cc66;">&#123;</span><span style="color: #000000; font-weight: bold;">height</span>:<span style="color: #cc66cc;color:#800000;">1</span>%<span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p> </p>
<p>If you run that code you will get a display similar to Figure 1 above.</p>
<p>The only extra element in Figure 1 is that I have placed some text to the right of the product title. I did this by placing the text in a  strong element and floated it to the right. However as floats need to be in front of the content that they will wrap (except for inline content on the same first line as the float but few browsers obey this anyway so its not worth arguing about) I have moved the strong element in front of the product description as follows.</p>
<div class="igBar"><span id="lhtml-40"><a href="#" onclick="javascript:showPlainTxt('html-40'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-40">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/dt.html"><span style="color: #000000; font-weight: bold;">&lt;dt&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/img.html"><span style="color: #000000; font-weight: bold;">&lt;img</span></a> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">"images/product.jpg"</span> <span style="color: #000066;">alt</span>=<span style="color: #ff0000;">"Product image"</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">"93"</span> <span style="color: #000066;">height</span>=<span style="color: #ff0000;">"62"</span> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/strong.html"><span style="color: #000000; font-weight: bold;">&lt;strong&gt;</span></a></span>Some info text here<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/strong&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">&lt;a</span></a> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">"#"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>The Name of the Product Goes here<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dt&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>There you have it. With relatively little code we have avoided a number of bugs and behaviors and produces a nice looking layout. I mentioned earlier that our fix only partially cured the 3px jog and the eagle eyed among you will note that although there is no jog on the content it does happen to be 3px further away than other browsers. If this is an issue for you then you can always offset this with a hack that applies 3px less right margin on the image. However I don't think many people will notice so I am not bothering to apply another hack.</p>
<p>The finished layout can be <a href="http://www.pmob.co.uk/search-this/definition-list3.htm"><strong>found here</strong></a> and I suggest that you copy the code from the demo itself  (view source) if you want to practice these techniques.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.search-this.com/2008/08/13/my-css-is-cat-categories-with-css/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>How Good Are You at JavaScript and CSS?</title>
		<link>http://www.search-this.com/2008/06/30/how-good-are-you-at-javascript-and-css/</link>
		<comments>http://www.search-this.com/2008/06/30/how-good-are-you-at-javascript-and-css/#comments</comments>
		<pubDate>Mon, 30 Jun 2008 13:57:51 +0000</pubDate>
		<dc:creator>Golgotha</dc:creator>
				<category><![CDATA[Website Design]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.search-this.com/?p=584</guid>
		<description><![CDATA[This year I have found myself looking for jobs on two separate occasions. As a result I have had a good number of interviews. One question that I found harder to answer than I had anticipated was when asked how good I am at JavaScript and CSS. 
Why was this question that hard to answer? [...]]]></description>
			<content:encoded><![CDATA[<p>This year I have found myself looking for jobs on two separate occasions. As a result I have had a good number of interviews. One question that I found harder to answer than I had anticipated was when asked how good I am at JavaScript and CSS. </p>
<p>Why was this question that hard to answer? I actually feel that I am quite knowledgeable about both CSS and JavaScript. I've built probably close to a dozen websites using entirely CSS-based layouts over the last few years. In addition, I have used JavaScript quite often to enhance those websites, usually with Ajax and spiffy web widgets like the <a href="http://www.search-this.com/comment-info-tip/">Comment Info Tip Plugin</a>. I may not be as knowledgeable as <a href="http://www.search-this.com/category/css/">Paul O'Brien</a> when it comes to CSS or <a href="http://snook.ca/jonathan/">Jonathan Snook</a> when it comes to JavaScript, but I certainly am competent. So again, what's the problem?</p>
<p>The problem is the damn cross-browser problems that still trip a person up from time to time. Almost every time I ask Paul for his help with CSS it has to do with a cross-browser issue: something works in Firefox, but not in IE or vice versa. Same with JavaScript; think <em>addEventListener </em>method in Firefox and <em>attachEvent </em>for Internet Explorer. This is a bloody mess for the developer and I suppose makes me question my abilities at times. </p>
<p>Such cross-browser issues make it hard for a developer. I don't know about you, but I've often spent more time trying to make a site work across all browsers than on the actual design of the site. </p>
<p>There are people that I know and respect that have chosen not to learn JavaScript at all because they were so put off by such difficulties. Also consider how difficult it's been to get people to leave HTML table-based designs behind in favor of CSS layouts. It's been slow at best. No doubt due much to the differences across browsers.</p>
<p><strong>What's your take? How has the difficulties in trying to achieve all browser support effected your attitude of CSS and JavaScipt?</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.search-this.com/2008/06/30/how-good-are-you-at-javascript-and-css/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>10 Things Any Web Developer Worth Their Spit Should Know</title>
		<link>http://www.search-this.com/2008/06/24/10-things-any-web-developer-worth-their-spit-should-know/</link>
		<comments>http://www.search-this.com/2008/06/24/10-things-any-web-developer-worth-their-spit-should-know/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 14:16:42 +0000</pubDate>
		<dc:creator>Golgotha</dc:creator>
				<category><![CDATA[Website Design]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.search-this.com/?p=678</guid>
		<description><![CDATA[

DOCTYPE Declaration
DOCTYPE (short for “document type declaration”) informs the browser of which HTML or XHTML standards you would like your code to be checked against. You're essentially declaring to the browser that these are the rules that you have used to create this page and in return you are expecting that it will render accordingly. [...]]]></description>
			<content:encoded><![CDATA[<ol>
<li>
<h3>DOCTYPE Declaration</h3>
<p>DOCTYPE (short for “document type declaration”) informs the browser of which HTML or XHTML standards you would like your code to be checked against. You're essentially declaring to the browser that these are the rules that you have used to create this page and in return you are expecting that it will render accordingly. Failure to specify a DOCTYPE can lead to unexpected rendering -- a developers worst nightmare.</p>
<p>[ <a href="http://www.alistapart.com/articles/doctype/">further reading</a> ]
</li>
<li>
<h3>Navigation</h3>
<p>A website's navigation plays a key role in the success or failure of a site. It allows humans and search engines alike to easily locate the desired information. Or it doesn't. Navigations made up of Flash or JavaScript/DHTML may seem attractive at first, but ultimately can cripple a website by not allowing search engines to crawl and index the entire site. In addition, viewers that choose not to partake in these technologies can be left with no means to move within the site. </p>
<p>Most experienced webmasters have left such navigations back in the 90's with all those AOL discs.
</li>
<li>
<h3>CSS is Not an Option</h3>
<p>In the past webmasters could choose to ignore CSS if they so desired. Those days are gone. CSS is no longer an option, it's part of the trifecta (see The Separation of Concerns for the trifecta) that makes up a quality website. A good webmaster will use CSS exclusively to define the look and layout of a website.
</li>
<li>
<h3>The Separation of Concerns</h3>
<p>In days gone by web developers would meld HTML, CSS, and JavaScript code all into a single page; like a web page jambalaya. Inexperienced web developers may still do this, but the experienced ones took notice that the make up of any given page is defined by three elements: the <em>content </em>of the page, the <em>presentation </em>of that content and the <em>behavior </em>of that content.</p>
<p>Realizing this, competent developers have made an effort to keep these three layers separate from one another.  Kevin Yank does a fine job explaining our three layers in his article: <a href="http://www.sitepoint.com/article/simply-javascript"><em>Simply JavaScript: The Three Layers of the Web</em></a></p>
<blockquote><p>
When building a site, we work through these layers from the bottom up:</p>
<p>   1. We start by producing the <em>content </em>in HTML format. This is the base layer, which any visitor using any kind of browser should be able to view.</p>
<p>   2. With that done, we can focus on making the site look better, by adding a layer of <em>presentation </em>information using CSS. The site will now look good to users able to display CSS styles.</p>
<p>   3. Lastly, we can use JavaScript to introduce an added layer of interactivity and dynamic <em>behavior</em>, which will make the site easier to use in browsers equipped with JavaScript.
</p></blockquote>
</li>
<li>
<h3>Cross-Browser Support</h3>
<p>Any developer that has been building websites for awhile has the battle scars that you get when you try and make your website work on all browsers. Each browser has it's own idiosyncrasies (some more than others) and designing and redesigning your site to function under each can be a battle; but it's a battle that must be fought and won. </p>
<p>[ <a href="http://www.search-this.com/2007/03/12/no-margin-for-error/">for more help with cross-browser CSS read this</a> ]
</li>
<li>
<h3>It's Not About You</h3>
<p>A common trait of the rookie developer is they think the design of a website is about them. That through the design of the site they somehow get the chance to express themselves. The professional realizes that it would be a huge mistake to design the site in such a way that pleases them only to neglect the site's visitors.</p>
<p>As a developer you must heed the words of Spock in <em><a href="http://en.wikipedia.org/wiki/Star_Trek_II:_The_Wrath_of_Khan">The Wrath of Khan</a></em> that the good of the many outweighs the good of the few, or the one. You are the one, the website's viewers are the many; make the website for them, not you.
</li>
<li>
<h3>Standards Are There For A Reason</h3>
<p>Let established web standards be your true north when you're deciding which way to go. Users, when they visit a website, expect a standard convention. For example, the main navigation we expect to be along the top or left hand side of the page, a search box above the fold and vertical scrolling. These are a few of the design traits we have come to expect, been conditioned to expect in Pavlovian fashion. Don't fight this, don't make us think, remember these have become the standards because they work, not because they don't work.
</li>
<li>
<h3>Validation</h3>
<p>Validation is not just a niceness, it's a necessity. Paul O'Brien has done an excellent job explaining the significance of validation in his article <a href="http://www.search-this.com/2008/04/24/why-validate/">Why Validate</a>.
</li>
<li>
<h3>Keep It Simple</h3>
<p>The novice developer can often feel compelled to flex their design muscles in an attempt to prove themselves. Far too often this can be reflected in bloated pages that are not easy to read, navigate or load. It is a great challenge to design a site that is visually appealing and yet serves to enhance the readability, not take away from it. Sites that cannot be easily scanned or navigated that cause a slow down in the browsing process run the risk of losing audience. The experienced developer has come to learn this, often the hard way. The novice will learn this, in time.
</li>
<li>
<h3>Nobody's Reading This</h3>
<p>Perhaps the biggest giveaway that a website was done by a rookie developer is the verbose content. The novice developer will often try and turn the company's preexisting marketing material into the website's context without efficiently editing it for the web. Good offline marketing doesn't always translate to good online marketing where users are impatient and looking for instant gratification.</p>
<p>In a study done by Penn State University they concluded that web users are picky and impatient;  one in five searchers spend 60 seconds or less on a document.</p>
<blockquote><p>“People make instantaneous judgments about whether to stay on a site, and if a site doesn’t give the right impression, users will bypass it," said Dr. Jim Jansen, assistant professor in Penn State’s information sciences and technology (IST). "A page has to be well-designed, easy to load and relevant to a searcher’s needs."</p>
<p>Otherwise, by the time three minutes have elapsed, 40 percent of searchers will have moved on. While some may have found what they wanted, others may simply have given up and moved to a different site, said the faculty member in Penn State’s School of Information Sciences and Technology (IST).</p></blockquote>
<p>[ <a href="http://www.search-this.com/website-promotion/impatient-web-searchers-measure-web-sites-appeal-in-seconds/">more here </a>]
</li>
</ol>
<p>Those are our ten things any web developer worth their spit should know. What do you think? Did we leave anything off the list that you think we should have included?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.search-this.com/2008/06/24/10-things-any-web-developer-worth-their-spit-should-know/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>The Problem With Web Design</title>
		<link>http://www.search-this.com/2008/05/27/the-problem-with-web-design/</link>
		<comments>http://www.search-this.com/2008/05/27/the-problem-with-web-design/#comments</comments>
		<pubDate>Tue, 27 May 2008 13:59:32 +0000</pubDate>
		<dc:creator>Golgotha</dc:creator>
				<category><![CDATA[Website Design]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://www.search-this.com/?p=667</guid>
		<description><![CDATA[ There's no doubt in my mind that the little blocks from Denmark known simply as LEGO are the greatest toy ever. I put in more hours playing with Legos than all other toys combined. I loved to use my imagination to build with them. It really didn't matter what: a car, a fortress, star [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.search-this.com/wp-content/uploads/2008/05/lego_block.gif" alt="" title="lego_block" width="96" height="93" align="left" style="padding-right:10px" /> There's no doubt in my mind that the little blocks from Denmark known simply as LEGO are the greatest toy ever. I put in more hours playing with Legos than all other toys combined. I loved to use my imagination to build with them. It really didn't matter what: a car, a fortress, star destroyer, space station, whatever. It was about taking an idea and bringing it to life piece by piece.</p>
<p>This love to build <em>something </em>from nothing still resides within me; it's just been replaced with web technologies instead of plastic bricks. Today I build <a href="http://www.fitphysicaltherapy.com/">websites</a>, <a href="http://www.search-this.com/comment-info-tip/">plugins</a>, <a href="http://www.search-this.com/tools/">widgets</a> and <a href="http://www.plasmapages.com/360-broadmoor.html">anything else</a> that takes life in my imagination. The thing I enjoy most is seeing if I can pull it off -- can I get what's in my head to take form on the web? Most of the time I can. </p>
<p>But there's something that really bugs me about all of my creations. They simply don't last. In fact, over the years I've found the life span of any web-based product to be short, very short. Of all the websites I've built, more are gone than remain. They've been replaced by newer versions or completely phased out. There's no place for nostalgia on the web.</p>
<p>I have a deep jealousy of designs that last. I look at <a href="http://en.wikipedia.org/wiki/Image:Sistine_Chapel_ceiling_photo_2.jpg">Michelangelo's Sistine Chapel</a> which has been around for five hundred years and is in no danger of ever being updated or phased out. Or Beethoven's 9th symphony which he completed in 1824 and still moves the soul today. I'm betting that even more recent artists like <a href="http://www.lassenart.com/vanilla.html">Christian R. Lassen</a> probably never worries about their work becoming dated and needing to be replaced. But in the world of computers, nothing lasts. </p>
<p>Does anyone else find this frustrating or at least a little depressing? Of course it's not just my work. I already have images of a new 3G iPhone dancing in my head and my current iPod is only two years old. My three thousand dollar computer that I hand built from the greatest specs three years ago doesn't run today's DirectX 10 games. How sad...</p>
<p>You have to ask yourself when developing software or web pages if pixel perfection's really all that important when it's only going to last a handful of years anyways? Could this be why Microsoft released Vista knowing full well that it was far from done? Microsoft is already talking about their next OS, <a href="http://en.wikipedia.org/wiki/Windows_7">Windows 7</a> and Vista is barely out of the wrapper.</p>
<p>I know, it is what it is, the beauty and the curse all rolled into one. The ability to create knowing full well that you will do it all over again in a handful of years. I guess it's job security, right? </p>
<p><strong>Your thoughts?</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.search-this.com/2008/05/27/the-problem-with-web-design/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>The Perception of a Website</title>
		<link>http://www.search-this.com/2008/03/19/the-perception-of-a-website/</link>
		<comments>http://www.search-this.com/2008/03/19/the-perception-of-a-website/#comments</comments>
		<pubDate>Wed, 19 Mar 2008 14:15:39 +0000</pubDate>
		<dc:creator>Golgotha</dc:creator>
				<category><![CDATA[Website Design]]></category>
		<category><![CDATA[perception]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://www.search-this.com/2008/03/19/the-perception-of-a-website/</guid>
		<description><![CDATA[As you walk into Starbucks the aroma of coffee brewing permeates your senses. Trendy music plays in the background with earth-tone painted walls, nicely lacquered wood and friendly baristas all help to create an inviting perception of quality and comfort. 
Of course this is all by design – Howard Schultz, then CEO of Starbucks made [...]]]></description>
			<content:encoded><![CDATA[<p>As you walk into Starbucks the aroma of coffee brewing permeates your senses. Trendy music plays in the background with earth-tone painted walls, nicely lacquered wood and friendly baristas all help to create an inviting perception of quality and comfort. </p>
<p>Of course this is all by design – Howard Schultz, then CEO of Starbucks made a trip to Italy during which he visited some 500 espresso bars in Milan and Verona. He observed local habits, took notes on decor and menus, snapped photographs, and videotaped baristas in action. He was looking to create the right perception.</p>
<p>Now compare this to McDonald’s – what’s your perception of McDonald’s? Probably fast, convenient comfort food; who do you think would have a better cup of coffee, McDonald’s or Starbucks?  </p>
<p>Perception dictates reality – Starbucks coffee tastes better because the consumer thinks it tastes better. But, a recent <em><a href="http://www.consumerreports.org/cro/food/beverages/coffee-tea/coffee-taste-test-3-07/overview/0307_coffee_ov_1.htm">Consumer Reports</a></em> found that McDonald’s coffee was actually better than Starbucks. That is the power of perception!</p>
<p>So when you start to build a website it’s imperative that you know the perception you want the website to present. </p>
<p>If you are developing a website for a client you need to learn how the company is currently perceived in its market. Are they seen as: conservative, progressive, friendly, formal, casual, serious, experts, humorous, service-oriented, professional or otherwise? Are they going to wish to strengthen this same perception through their website or are they looking to make a change?</p>
<p>What challenges are they facing getting their image across to customers? Or maybe they are doing a good job with this and you need to learn why they are successful so you can be equally successful with their website.</p>
<p>A company's perception will impact the overall design of the website. Take GEICO and Allstate: they are both insurance companies, yet each conveys a different perception. The perception of GEICO, with its humorous speaking gecko and the “So easy, a caveman can do it” ads has a more relaxed feel than the Allstate insurance company with its more formal "You're in good hands" ads. We might anticipate that the websites for these two insurance companies could be completely different even though they are in the same field.  </p>
<p>Perception is powerful, it’s how we see things – not how they really are.</p>
<p>If you were to ask someone what they <em>feel </em>about the company after they have left the website, that’s the perception the site is giving off.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.search-this.com/2008/03/19/the-perception-of-a-website/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Web Developer Crossword Puzzle &#8211; ANSWERS</title>
		<link>http://www.search-this.com/2008/02/15/web-developer-crossword-puzzle-answers/</link>
		<comments>http://www.search-this.com/2008/02/15/web-developer-crossword-puzzle-answers/#comments</comments>
		<pubDate>Fri, 15 Feb 2008 15:20:01 +0000</pubDate>
		<dc:creator>Golgotha</dc:creator>
				<category><![CDATA[Website Design]]></category>
		<category><![CDATA[web crossword puzzle]]></category>

		<guid isPermaLink="false">http://www.search-this.com/2008/02/15/web-developer-crossword-puzzle-answers/</guid>
		<description><![CDATA[Here are the answers to the Web Developer Crossword Puzzle you hopefully took last week (2/6/2008). 
I know some of you said it was a little tough, but hopefully you enjoyed it? Besides, it's good to stretch your brain with a good crossword or sudoku puzzle from time-to-time. 
HERE ARE THE ANSWERS:
Web Crossword Answers PDF
Web [...]]]></description>
			<content:encoded><![CDATA[<p>Here are the answers to the <a href="http://www.search-this.com/2008/02/06/web-developer-crossword-puzzle/"><strong>Web Developer Crossword Puzzle</strong></a> you hopefully took last week (2/6/2008). </p>
<p>I know some of you said it was a little tough, but hopefully you enjoyed it? Besides, it's good to stretch your brain with a good crossword or sudoku puzzle from time-to-time. </p>
<p>HERE ARE THE ANSWERS:<br />
<a href='http://www.search-this.com/wp-content/uploads/2008/02/web-crossword-answers.pdf' title='web-crossword-answers.pdf' target="_blank">Web Crossword Answers PDF</a></p>
<p><a href='http://www.search-this.com/wp-content/uploads/2008/02/web-crossword-answers.gif' title='web-crossword-answers.gif' target="_blank">Web Crossword Answers GIF</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.search-this.com/2008/02/15/web-developer-crossword-puzzle-answers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Web Developer Crossword Puzzle</title>
		<link>http://www.search-this.com/2008/02/06/web-developer-crossword-puzzle/</link>
		<comments>http://www.search-this.com/2008/02/06/web-developer-crossword-puzzle/#comments</comments>
		<pubDate>Wed, 06 Feb 2008 15:43:34 +0000</pubDate>
		<dc:creator>Golgotha</dc:creator>
				<category><![CDATA[Entertainment]]></category>
		<category><![CDATA[Website Design]]></category>
		<category><![CDATA[crossword puzzle]]></category>

		<guid isPermaLink="false">http://www.search-this.com/2008/02/06/web-developer-crossword-puzzle/</guid>
		<description><![CDATA[A crossword puzzle for Web developers!

This crossword puzzle's questions cover such topics as: search engines, CSS, C#, JavaScript, Browsers, Programming and just about anything else Web-related, just like Search-This does.
So get yourself a cup of coffee and download the PDF file or view the image and print it out. Good luck geeks!
There are 25 questions. [...]]]></description>
			<content:encoded><![CDATA[<h2>A crossword puzzle for Web developers!</h2>
<p><img src='http://www.search-this.com/wp-content/uploads/2008/02/crossword-pic.jpg' alt='crossword puzzle' width='410' height='200' /></p>
<p>This crossword puzzle's questions cover such topics as: search engines, CSS, C#, JavaScript, Browsers, Programming and just about anything else Web-related, just like Search-This does.</p>
<p>So get yourself a cup of coffee and download the PDF file or view the image and print it out. Good luck geeks!</p>
<p>There are 25 questions. The answers will be posted next week.</p>
<p><img src='http://www.search-this.com/wp-content/uploads/2008/02/pdf_icon.gif' alt='pdf_icon.gif' align='middle' height='45' width='45' /><a href='http://www.search-this.com/wp-content/uploads/2008/02/web-crossword.pdf' title='web-crossword.pdf' target='_blank'>Download Web Developer Crossword Puzzle</a></p>
<p>You can also <a href='http://www.search-this.com/wp-content/uploads/2008/02/web-crossword.gif' title='web-crossword.gif' target='_blank'>click here to view an image of the crossword puzzle and print it</a> should you want to.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.search-this.com/2008/02/06/web-developer-crossword-puzzle/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Simple Round Corners in CSS (revisited)</title>
		<link>http://www.search-this.com/2008/01/24/simple-round-corners-in-css-revisited/</link>
		<comments>http://www.search-this.com/2008/01/24/simple-round-corners-in-css-revisited/#comments</comments>
		<pubDate>Thu, 24 Jan 2008 14:27:11 +0000</pubDate>
		<dc:creator>Paul OB</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Website Design]]></category>
		<category><![CDATA[round corners]]></category>

		<guid isPermaLink="false">http://www.search-this.com/2008/01/24/simple-round-corners-in-css-revisited/</guid>
		<description><![CDATA[Oh No! Not more round corners!
In a previous article  we learned how to apply some nice shadowed corners and sides to a fluid width box and I thought it would be good to show a similar method that allows for transparent corners. This will allow the element to sit on any colored background without [...]]]></description>
			<content:encoded><![CDATA[<h2>Oh No! Not more round corners!</h2>
<p>In a previous <a href="http://www.search-this.com/2007/02/12/css-liquid-round-corners/">article</a>  we learned how to apply some nice shadowed corners and sides to a fluid width box and I thought it would be good to show a similar method that allows for transparent corners. This will allow the element to sit on any colored background without having to paint the transparent part of the corner with the background color.</p>
<p>I know you might think "Oh no - not another round corner tutorial" but stick with it and I'm sure you'll find some of this info useful. Round corners are always a bit of a pain to do in CSS so I present here an easy to follow way to make round corners that can be used everywhere. We aren't going to do anything clever or overly complicated and we aren't going to bother with shadowed corners/sides because as I mentioned above we have already been <a href="http://www.search-this.com/2007/02/12/css-liquid-round-corners/">there</a>.</p>
<p>Before we begin here is a finished <strong><a href="http://www.pmob.co.uk/pob/simple-round-example5.htm">example</a></strong> for you to look at.</p>
<p>In order to use the round corner on different backgrounds I am going to use an image using the <a href="http://en.wikipedia.org/wiki/Portable_Network_Graphics">PNG8</a> (Portable Network Graphics) format with alpha transparency as shown by Alex in this useful <a href="http://www.sitepoint.com/blogs/2007/09/18/png8-the-clear-winner/">article</a>. If you don't have <a href="http://www.adobe.com/products/fireworks/">Fireworks</a> or want smoother corners in IE6 and under then you will need to make images with the appropriate color background in the normal <a href="#">GIF</a> (Graphic Interchange Format) format.</p>
<p>Here is the type of image I will be using for the following examples:</p>
<p>Figure 1</p>
<p><img src='http://www.search-this.com/wp-content/uploads/2008/01/one-round-test.png' alt='one-round-test.png' /></p>
<p>The image is a white circle with a 20px diameter that I have placed on a green background so that you can see it and so you can see what the effect will be against a different color background. (The <a href="http://www.pmob.co.uk/pob/images/one-round-test2.png">real image</a> won't have a green background of course.)</p>
<p>As you can see the image displays nicely on the green background in browsers that support alpha transparency because the corners are transparent. In IE6 and under the corners will appear slightly more jagged but eminently usable. What's good about this is that no hacks or filters are required.</p>
<p>Here is a magnified screenshot of the top left corner in IE6 and IE7 to show the differences:</p>
<p>Figure 2</p>
<p><img src='http://www.search-this.com/wp-content/uploads/2008/01/simple-screen1.jpg' alt='simple-screen1.jpg' /></p>
<p>That looks quite acceptable to me and if it's acceptable to you then we will plow on with the demonstration.</p>
<p>I should point out that you will need to create different colored circles if you want your elements to be different colors but unlike other methods you don't have to worry about the background of the elements that your box is laid upon.</p>
<h3>One Size Fits All</h3>
<p>We are going to use a single image (20px x 20px) to provide our rounded corners and to save on using different images we will use one image only and simply place each corner into place using the background-position property. The image is completely round but I'll only be showing one quadrant of it at a time and therefore we can supply all four corners with one simple image weighing in at only 300 bytes.</p>
<p>Figure 3</p>
<p><img src='http://www.search-this.com/wp-content/uploads/2008/01/one-round-quadrant.png' alt='one-round-quadrant.png' /></p>
<p>The benefit of using a single image is that all corners get loaded immediately after the first corner is drawn so there is virtually no delay.</p>
<h3>Cut It Out</h3>
<p>You may think that you could simply place the image in the four corners of a rectangular box but things aren't as simple as that. Our box needs to have a background color and as we are using a white corner image we need a white background for our box. However, if we place a transparent corner in the corner of that box then in fact nothing really happens. The reason is that the transparent part of the image lets the white background show through and all we get is the square box we started with.</p>
<p>In order for the corners to work properly the corner of the box must be over the background color of the element outside our current box. We therefore need to drag the round corners outside the box to start with but that presents more problems. Here is a screenshot of what the corners will look like outside the box so you can understand what's going on</p>
<p>Figure 4</p>
<p><img src='http://www.search-this.com/wp-content/uploads/2008/01/simple-screen3.jpg' alt='simple-screen3.jpg' /></p>
<p>As you can see we have a problem whatever we do! If the images are inside the rectangle then they become invisible. If they are outside the rectangle then it looks even worse as figure 4 above shows</p>
<p>What we really need is a rectangular box where the four corners are cut-out to give a cross-shaped effect. If we made sure that the cut-out matched the radius of our circle (10px) then we could pop our corners nicely into place.</p>
<p>We can achieve this by nesting an inner box inside our outer box and then dragging it outside of the parent using a negative top and bottom margin. If we also give side padding to the parent and top padding to the child we can get a cut out effect like this.</p>
<p>Figure 5</p>
<p><img src='http://www.search-this.com/wp-content/uploads/2008/01/simple-screen2.jpg' alt='simple-screen2.jpg' /></p>
<p>The CSS mark up for this is as follows:</p>
<div class="igBar"><span id="lcss-48"><a href="#" onclick="javascript:showPlainTxt('css-48'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CSS:</span>
<div id="css-48">
<div class="css">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">* <span style="color: #66cc66;">&#123;</span><span style="color: #000000; font-weight: bold;">margin</span>:<span style="color: #cc66cc;color:#800000;">0</span>;padding:<span style="color: #cc66cc;color:#800000;">0</span><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">h1 <span style="color: #66cc66;">&#123;</span><span style="color: #000000; font-weight: bold;">margin</span>:.5em;<span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">body <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">background</span>:#e5e5e5;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">color</span>:#000;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">.box<span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">float</span>:<span style="color: #000000; font-weight: bold;">left</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">background</span>:#fff;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">padding<span style="color: #3333ff;">:<span style="color: #cc66cc;color:#800000;">0</span> </span>10px;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">margin</span>:10px;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">display</span>:<span style="color: #993333;">inline</span>;<span style="color: #808080; font-style: italic;">/* IE double margin bug*/</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">.one<span style="color: #66cc66;">&#123;</span><span style="color: #000000; font-weight: bold;">width</span>:<span style="color: #cc66cc;color:#800000;">40</span>%<span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">.inner<span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">background</span>:#fff;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">padding<span style="color: #3333ff;">:10px </span><span style="color: #cc66cc;color:#800000;">0</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">margin<span style="color: #3333ff;">:-10px </span><span style="color: #cc66cc;color:#800000;">0</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">position</span>:<span style="color: #993333;">relative</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Followed by the simple HTML:</p>
<div class="igBar"><span id="lcode-49"><a href="#" onclick="javascript:showPlainTxt('code-49'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-49">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;div class=<span style="color:#CC0000;">"box one"</span>&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;div class=<span style="color:#CC0000;">"inner"</span>&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;p&gt;Lorem ipsum dolor sit amet, consectetuer adipiscing elit. <span style="">Sed</span> convallis mauris eu ipsum. <span style="">Proin</span> volutpat facilisis dui. <span style="">Sed</span> pretium pulvinar arcu.&lt;/p&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/div&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/div&gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>The next step is to provide four elements and place our corners into position with static positioning. We will be leaving a 10px padding around our box so that we have room to position the corners nicely without affecting the inner content. (<strong>Don't be tempted to use absolute positioning because IE <a href="http://www.pmob.co.uk/temp/onepxgap.htm">is always 1px out</a> when the distance traveled is an odd pixel number. This happens on right and bottom absolutely placed elements and can destroy a layout like this.)</strong></p>
<p>I am going to use a div with nested span to provide elements for the corners but if you wanted to reduce mark up you could use a nested "b" element as suggested by <a href="http://meyerweb.com/eric/thoughts/2004/08/23/markup-missive/">Eric Meyer</a> (although its use for background images is not likely to be very semantic). Using a nested b element would also negate the need for a class as you are unlikely to have any other elements like this on your page. Anyway I am sticking with the div and nested span as it is easier to follow.</p>
<p>The HTML we need for this is as follows:</p>
<div class="igBar"><span id="lcode-50"><a href="#" onclick="javascript:showPlainTxt('code-50'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-50">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;div class=<span style="color:#CC0000;">"box one"</span>&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;div class=<span style="color:#CC0000;">"inner"</span>&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;div class=<span style="color:#CC0000;">"top"</span>&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;p&gt;Lorem ipsum dolor sit amet, consectetuer adipiscing elit. <span style="">Sed</span> convallis mauris eu ipsum. <span style="">Proin</span> volutpat facilisis dui. <span style="">Sed</span> pretium pulvinar arcu.&lt;/p&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;div class=<span style="color:#CC0000;">"base"</span>&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/div&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/div&gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>The extra div and span has been placed inside the .inner element which means we must drag the top corners upwards into the padding area and then outwards into free space so that the transparent corners can show. The reverse process is needed for the bottom corners. There are a couple of "haslayout" bugs to squash on the way and IE6 also needs position relative applied to make the corners show.</p>
<p>The revised CSS and HTML for the whole section is shown below.</p>
<div class="igBar"><span id="lcss-51"><a href="#" onclick="javascript:showPlainTxt('css-51'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CSS:</span>
<div id="css-51">
<div class="css">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">* <span style="color: #66cc66;">&#123;</span><span style="color: #000000; font-weight: bold;">margin</span>:<span style="color: #cc66cc;color:#800000;">0</span>;padding:<span style="color: #cc66cc;color:#800000;">0</span><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">h1 <span style="color: #66cc66;">&#123;</span><span style="color: #000000; font-weight: bold;">margin</span>:.5em;<span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">body <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">background</span>:#e5e5e5;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">color</span>:#000;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">.box<span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">float</span>:<span style="color: #000000; font-weight: bold;">left</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">background</span>:#fff;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">padding<span style="color: #3333ff;">:<span style="color: #cc66cc;color:#800000;">0</span> </span>10px;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">margin</span>:10px;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">display</span>:<span style="color: #993333;">inline</span>;<span style="color: #808080; font-style: italic;">/* IE double margin bug*/</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">.one<span style="color: #66cc66;">&#123;</span><span style="color: #000000; font-weight: bold;">width</span>:<span style="color: #cc66cc;color:#800000;">40</span>%<span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">.inner<span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">background</span>:#fff;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">padding<span style="color: #3333ff;">:10px </span><span style="color: #cc66cc;color:#800000;">0</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">margin<span style="color: #3333ff;">:-10px </span><span style="color: #cc66cc;color:#800000;">0</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">min-<span style="color: #000000; font-weight: bold;">height</span>:<span style="color: #cc66cc;color:#800000;">0</span>;<span style="color: #808080; font-style: italic;">/* ie7 haslayout issues fix*/</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">position</span>:<span style="color: #993333;">relative</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">* html .inner<span style="color: #66cc66;">&#123;</span><span style="color: #000000; font-weight: bold;">height</span>:1px<span style="color: #66cc66;">&#125;</span><span style="color: #808080; font-style: italic;">/* ie6 haslayout issues fix*/</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">.<span style="color: #000000; font-weight: bold;">top</span>,.base<span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">margin<span style="color: #3333ff;">:-10px </span>-10px <span style="color: #cc66cc;color:#800000;">0</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">background</span>:<span style="color: #993333;">url</span><span style="color: #66cc66;">&#40;</span>images/one-round-test2.png<span style="color: #66cc66;">&#41;</span> <span style="color: #993333;">no-repeat</span> <span style="color: #000000; font-weight: bold;">left</span> <span style="color: #000000; font-weight: bold;">top</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">height</span>:10px;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">position</span>:<span style="color: #993333;">relative</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">font-size</span>:10px;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">.base<span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">background-position<span style="color: #3333ff;">:<span style="color: #000000; font-weight: bold;">left</span> </span>bottom;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">margin<span style="color: #3333ff;">:<span style="color: #cc66cc;color:#800000;">0</span> </span>-10px -10px;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #6666ff;">.<span style="color: #000000; font-weight: bold;">top</span> </span>span,<span style="color: #6666ff;">.base </span>span<span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">background</span>:<span style="color: #993333;">url</span><span style="color: #66cc66;">&#40;</span>images/one-round-test2.png<span style="color: #66cc66;">&#41;</span> <span style="color: #993333;">no-repeat</span> <span style="color: #000000; font-weight: bold;">right</span> <span style="color: #000000; font-weight: bold;">top</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">display</span>:<span style="color: #993333;">block</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">height</span>:10px;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">font-size</span>:10px;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #6666ff;">.base </span>span<span style="color: #66cc66;">&#123;</span>background-position<span style="color: #3333ff;">:<span style="color: #000000; font-weight: bold;">right</span> </span>bottom;<span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>I have also added a content div in the middle just to tidy things up and the revised HTML is as follows:</p>
<div class="igBar"><span id="lcode-52"><a href="#" onclick="javascript:showPlainTxt('code-52'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-52">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;div class=<span style="color:#CC0000;">"box one"</span>&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;div class=<span style="color:#CC0000;">"inner"</span>&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;div class=<span style="color:#CC0000;">"top"</span>&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;div class=<span style="color:#CC0000;">"content"</span>&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;p&gt;Lorem ipsum dolor sit amet, consectetuer adipiscing elit. <span style="">Sed</span> convallis mauris eu ipsum. <span style="">Proin</span> volutpat facilisis dui. <span style="">Sed</span> pretium pulvinar arcu.&lt;/p&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/div&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;div class=<span style="color:#CC0000;">"base"</span>&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/div&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/div&gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>The font-size:10px in the CSS is there to restrict IE's height to 10px; otherwise it would increase the element to the full current font-size and spoil the effect. The result of the above code can be seen in these live examples:</p>
<p><strong><a href="http://www.pmob.co.uk/pob/simple-round-example2.htm">Example 1 </a></strong></p>
<p><strong><a href="http://www.pmob.co.uk/pob/simple-round-example3.htm">Example 2 </a></strong></p>
<p><strong><a href="http://www.pmob.co.uk/pob/simple-round-example4.htm">Example 3</a></strong></p>
<p>For ease of use the CSS has been left in the head so that you can view source and inspect it easily.</p>
<h3>Not Floated </h3>
<p>The above example uses floats to hold everything together but we can simplify this a little and use static elements instead. Instead of floating the outer we can give it a width or leave it as width:auto and set the margins accordingly. Once again IE6 needs a helping hand and we have to use the ubiquitous "haslayout" fix to bring it all into line.</p>
<p>The only thing worth noting is that now that the main element isn't floated you will find that margin collapse affects the negative margined corners in Firefox and in order to stop the margin collapse we will simply add a 1px border in the current background color. This will cure the effect quite simply (read more about collapsing margins in a <strong><a href="http://www.search-this.com/2007/05/07/wheres-my-margin-gone-or-why-111/">previous article</a></strong>.) </p>
<p>Here is the revised CSS:</p>
<div class="igBar"><span id="lcss-53"><a href="#" onclick="javascript:showPlainTxt('css-53'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CSS:</span>
<div id="css-53">
<div class="css">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">.box<span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">width</span>:760px;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">background</span>:#fff;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">padding<span style="color: #3333ff;">:<span style="color: #cc66cc;color:#800000;">0</span> </span>9px;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">margin<span style="color: #3333ff;">:30px </span>auto;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">position</span>:<span style="color: #993333;">relative</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">border<span style="color: #3333ff;">:1px </span>solid #fff;<span style="color: #808080; font-style: italic;">/* stop margin collapse*/</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">.inner<span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">background</span>:#fff;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">padding<span style="color: #3333ff;">:10px </span><span style="color: #cc66cc;color:#800000;">0</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">margin<span style="color: #3333ff;">:-10px </span><span style="color: #cc66cc;color:#800000;">0</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">min-<span style="color: #000000; font-weight: bold;">height</span>:<span style="color: #cc66cc;color:#800000;">0</span>;<span style="color: #808080; font-style: italic;">/* ie7 haslayout issues fix*/</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">position</span>:<span style="color: #993333;">relative</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">* html .inner, * html .box<span style="color: #66cc66;">&#123;</span><span style="color: #000000; font-weight: bold;">height</span>:1px<span style="color: #66cc66;">&#125;</span><span style="color: #808080; font-style: italic;">/* ie6 haslayout issues fix*/</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">.<span style="color: #000000; font-weight: bold;">top</span>,.base<span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">margin<span style="color: #3333ff;">:-10px </span>-10px <span style="color: #cc66cc;color:#800000;">0</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">background</span>:<span style="color: #993333;">url</span><span style="color: #66cc66;">&#40;</span>images/one-round-test2.png<span style="color: #66cc66;">&#41;</span> <span style="color: #993333;">no-repeat</span> <span style="color: #000000; font-weight: bold;">left</span> <span style="color: #000000; font-weight: bold;">top</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">height</span>:10px;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">position</span>:<span style="color: #993333;">relative</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">font-size</span>:10px;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">clear<span style="color: #3333ff;">:<span style="color: #993333;">both</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"></span><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">.base<span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">background-position<span style="color: #3333ff;">:<span style="color: #000000; font-weight: bold;">left</span> </span>bottom;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">margin<span style="color: #3333ff;">:<span style="color: #cc66cc;color:#800000;">0</span> </span>-10px -10px;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #6666ff;">.<span style="color: #000000; font-weight: bold;">top</span> </span>span,<span style="color: #6666ff;">.base </span>span<span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">background</span>:<span style="color: #993333;">url</span><span style="color: #66cc66;">&#40;</span>images/one-round-test2.png<span style="color: #66cc66;">&#41;</span> <span style="color: #993333;">no-repeat</span> <span style="color: #000000; font-weight: bold;">right</span> <span style="color: #000000; font-weight: bold;">top</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">display</span>:<span style="color: #993333;">block</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">height</span>:10px;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">font-size</span>:10px;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #6666ff;">.base </span>span<span style="color: #66cc66;">&#123;</span>background-position<span style="color: #3333ff;">:<span style="color: #000000; font-weight: bold;">right</span> </span>bottom;<span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">.<span style="color: #000000; font-weight: bold;">content</span><span style="color: #66cc66;">&#123;</span><span style="color: #000000; font-weight: bold;">width</span>:<span style="color: #cc66cc;color:#800000;">100</span>%;<span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>HTML:</p>
<div class="igBar"><span id="lcode-54"><a href="#" onclick="javascript:showPlainTxt('code-54'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-54">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;div class=<span style="color:#CC0000;">"box"</span>&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;div class=<span style="color:#CC0000;">"inner"</span>&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;div class=<span style="color:#CC0000;">"top"</span>&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;div class=<span style="color:#CC0000;">"content"</span>&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;p&gt;Lorem ipsum dolor sit amet, consectetuer adipiscing elit. <span style="">Sed</span> convallis mauris eu ipsum. <span style="">Proin</span> volutpat facilisis dui. <span style="">Sed</span> pretium pulvinar arcu. &lt;/p&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/div&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;div class=<span style="color:#CC0000;">"base"</span>&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/div&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/div&gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>As you can see in <strong><a href="http://www.pmob.co.uk/pob/simple-round-example5.htm"> Example 5</a> </strong>things are looking better now and much easier to control. You can even nest the boxes quite easily now. </p>
<h3>What about borders?</h3>
<p>If you want to add borders to the element and the corners then you will need to make a new round image with the border color that you require. We can then add CSS borders to our layout to match up and complete the illusion. Unfortunately you will need to make two images this time because of course the bordered part of the round corner that extends into our layout will show. We can get away with two images because some of the image will already be covered up by the negative margin we used on the content.</p>
<p>Here is a screenshot of what happens when just the single image is used:<br />
 <img src='http://www.search-this.com/wp-content/uploads/2008/01/simple-screen4.png' alt='simple-screen4.png' /></p>
<p>As you can see some of the border has already been rubbed out so we just need to make images without the sections that are visible above. Two images will be enough for this.</p>
<p>If you don't mind a couple of hacks you can drag the inner content over the visible part of the border and the whole thing can be done using one image only as shown  <a href="http://www.pmob.co.uk/pob/simple-round-example6.htm" ><strong>in this live example</strong></a> and in the screenshot below.</p>
<p><img src='http://www.search-this.com/wp-content/uploads/2008/01/simple-screen5.png' alt='simple-screen5.png' /></p>
<p>I would recommend, however, using two images and avoiding the hacks to keep things simpler. You should be able to work out what's going on by looking at the source code so I won't go into more detail and leave that as an exercise for you.</p>
<p><strong>Drawbacks</strong></p>
<p>The main drawback is once again the extra html mark up required to place each corner and if that upsets you then you may want to try one of the many <a href="http://webdesign.html.it/articoli/leggi/528/more-nifty-corners/">javascript</a> <a href="http://www.456bereastreet.com/archive/200505/transparent_custom_corners_and_borders/"> solutions</a> that are out there.</p>
<p>There is also extra maintenance involved with the negative positioning that we used and you will need to take this into account when you place the corners alongside other elements as they will overlap other elements if you don't allow about 10px more space than you thought you needed.</p>
<p>In addition, the first examples make a lot of use of floats to hold everything together and you may need to wrap the whole lot in a static element if you need to place it somewhere (see example 4 above). Example 5 is the most stable version and the method I recommend you use but either method will work following the guidelines already outlined.</p>
<p>IE6 is also a little jumpy on fluid floated layouts at small screen sizes but that's nothing new and something you'll have to live with. Example 5 does not suffer from this though because the outer wrappers are not floated.</p>
<p>The advantage of this method is that the image is only 300bytes and you are not restricted by size like most other methods that use a massive image to draw the sides and borders. The above examples can have unlimited width and height and carry virtually no overhead in file size apart from the extra HTML of course.</p>
<p>I started out by saying this was simple but due to bugs and browser differences it wasn't really that simple was it? Please refer to the examples for the full code as there are some fixes in place for the various demos. Have fun playing with the examples and if you find a better method of doing this, or want help with the above, or if you find some bugs then let's hear from you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.search-this.com/2008/01/24/simple-round-corners-in-css-revisited/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Hip to Be Square</title>
		<link>http://www.search-this.com/2007/11/14/hip-to-be-square/</link>
		<comments>http://www.search-this.com/2007/11/14/hip-to-be-square/#comments</comments>
		<pubDate>Wed, 14 Nov 2007 15:06:28 +0000</pubDate>
		<dc:creator>AutisticCuckoo</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Website Design]]></category>

		<guid isPermaLink="false">http://www.search-this.com/2007/11/14/hip-to-be-square/</guid>
		<description><![CDATA[Have you looked at other people's style sheets lately? Were you baffled to find square brackets in the CSS code? If so, this article might be of interest to you.
What Does It Mean?
Curly braces should feel comfortable to any CSS author, since you cannot write any useful CSS without them. Regular parentheses should be fairly [...]]]></description>
			<content:encoded><![CDATA[<p>Have you looked at other people's style sheets lately? Were you baffled to find square brackets in the CSS code? If so, this article might be of interest to you.</p>
<h2>What Does It Mean?</h2>
<p>Curly braces should feel comfortable to any CSS author, since you cannot write any useful CSS without them. Regular parentheses should be fairly familiar, too, at least if you've used functional notations like <code>background-image:url("/images/bg.png")</code> or <code>color:rgb(128, 128, 255)</code>. But square brackets?</p>
<p>The square brackets denote an attribute selector – a concept that was introduced in 1998 in CSS Level 2. <strong>An attribute selector modifies a simple selector by imposing an additional constraint on it</strong>. Does that sound like Greek to you? (Or like something other than Greek, for those of you who are, in fact, Greek?) Don't worry, we'll look at some examples in a short while.</p>
<h2>Why Should You Even Bother?</h2>
<p>But first, let's address another question: If attribute selectors really are useful, why didn't you already know about them? Or, to turn it around, since you've managed to get by without them, what's the point of using them?</p>
<p>The reason you may not have heard about them is quite simple: Internet Explorer for Windows up to and including version 6 don't support attribute selectors.  Since the market share for those browser versions has been well above 80% until very recently, there hasn't been much incentive for using attribute selectors in public-facing websites.</p>
<p>Version 7 of IE does support attribute selectors, though, and as more and more users upgrade from IE6, attribute selectors gain more interest.</p>
<p>What can those newfangled attribute selectors do then, that's so useful that you should take some of your precious time to learn about them? The answer is that they allow you to do a lot of things that you hitherto have had no other way to achieve than to pollute your markup with <code>class</code> attributes.</p>
<h2>How Does It Work?</h2>
<p>As I said before, an attribute selector is a modifier on a simple selector. A simple selector, as you may recall, is made up by the following components:</p>
<ul>
<li>a type selector, or an implicit or explicit universal selector</li>
<li>an optional ID selector</li>
<li>zero or more class selectors</li>
<li>zero or more pseudo-classes</li>
<li>zero or more attribute selectors</li>
</ul>
<p>As we shall see, class selectors are really just a special case of attribute selectors.</p>
<p>Let's look at some simple selectors and identify the different components.</p>
<p><code>h1</code></p>
<p>This selector consists of a type selector and nothing else. It matches all elements whose element type is <code>h1</code>.</p>
<p><code>#nav</code></p>
<p>This selector appears to contain only an ID selector, but there's a bit more here than meets the eye. The selector is actually <code>*#nav</code>, but it's customary to omit the universal selector (<code>*</code>) when it's implied. So there's a universal selector and there's an ID selector. The combination will match any element whose ID attribute has the exact value “nav”.  Since IDs must be unique, this selector will match at most one element on the page. The implicit universal selector means that it will match this element regardless of what element type it has.</p>
<p><code>a.external:visited</code></p>
<p>This selector consists of a type selector (<code>a</code>), a class selector (<code>.external</code>) and a pseudo-class (<code>:visited</code>). It matches some hypertext anchors (links) that the browser considers unvisited. Some? Yes, it only matches unvisited links that belong to the class <code>external</code>, i.e., whose <code>class</code> attribute contains that word.</p>
<p>All right, but what about those attribute selectors? There are four different flavors in CSS2, and another three that are defined in CSS3. All seven flavors are implemented by the latest versions of the mainstream browsers: IE7, Firefox, Opera and Safari. Note that IE6 is conspicuously absent from the list. It has no support at all for attribute selectors.</p>
<p>Let's look at the different flavors, then.</p>
<h3>Attribute Presence</h3>
<p><code>[title]</code></p>
<p>This CSS2 attribute selector matches any element that has a <code>title</code> attribute specified. It doesn't matter what value the <code>title</code> attribute has. As I'm sure you know by now, the selector is really <code>*[title]</code> with an implicit universal selector.</p>
<p>The attribute name is an identifier, so don't put any quotation marks around it.</p>
<p>This may not appear to be very useful at first, but it actually does come in handy at times. Say that we want to provide a visual clue – a dotted bottom border – for any element that has a <code>title</code> attribute, to alert the reader that there's an advisory title available which may be displayed as a tool-tip. We'll also change the mouse cursor for those elements, to emphasise that the tool-tip is meant as some form of help to the reader.</p>
<div class="igBar"><span id="lcss-60"><a href="#" onclick="javascript:showPlainTxt('css-60'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CSS:</span>
<div id="css-60">
<div class="css">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#91;</span>title<span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000000; font-weight: bold;">border-bottom</span>: 1px <span style="color: #993333;">dotted</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000000; font-weight: bold;">cursor</span>: <span style="color: #993333;">help</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<h3>Simple Attribute Value</h3>
<p><code>input[type="submit"]</code></p>
<p>This CSS2 attribute selector matches any <code>input</code> element whose <code>type</code> attribute has the value “submit”.</p>
<p>The attribute value can be specified as a string (enclosed in quotes) or as an identifier (no quotes). I generally prefer to use strings, myself.</p>
<p>The attribute name is case insensitive in HTML (including pretend-XHTML), but case sensitive in XML (including real XHTML). The attribute value may or may not be case sensitive in HTML, depending on the attribute. In real XHTML all attribute values are case sensitive.</p>
<p>We can use this to style form buttons without having to resort to a class:</p>
<div class="igBar"><span id="lcss-61"><a href="#" onclick="javascript:showPlainTxt('css-61'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CSS:</span>
<div id="css-61">
<div class="css">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">button,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">input<span style="color: #66cc66;">&#91;</span>type=<span style="color: #ff0000;">"button"</span><span style="color: #66cc66;">&#93;</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">input<span style="color: #66cc66;">&#91;</span>type=<span style="color: #ff0000;">"reset"</span><span style="color: #66cc66;">&#93;</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">input<span style="color: #66cc66;">&#91;</span>type=<span style="color: #ff0000;">"submit"</span><span style="color: #66cc66;">&#93;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000000; font-weight: bold;">background-color</span>: #369;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000000; font-weight: bold;">color</span>: #fff;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000000; font-weight: bold;">border</span>: 2px <span style="color: #993333;">solid</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000000; font-weight: bold;">border-color</span>: #69c #036 #036 #69c;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Note that <code>[id="nav"]</code> is not equivalent to <code>#nav</code>. The two selectors will match the same element in HTML or XHTML, but the latter has a much higher specificity than the former. (Specificity is a concept in the cascade, which decides which style rules take precedence over others in cases of conflict.)</p>
<p>Also, <code>[id="nav"]</code> matches an element with an attribute named “id”, whose value is “nav”. On the other hand, <code>#nav</code> matches an element whose ID attribute has the value “nav”. Does that sound like six of one and half a dozen of the other? It's not, actually. An ID attribute is one whose <em>type</em> is declared to be <code>ID</code> in a DTD, XML Schema or similar.  It doesn't have to be named <code>id</code> at all. And an attribute named <code>id</code> doesn't have to be an ID attribute. In HTML and XHTML, the only attribute of type <code>ID</code> happens to be named <code>id</code>, but that isn't necessarily the case for XML applications in general.</p>
<h3>Attribute List Value</h3>
<p><code>p[class~="literary"]</code></p>
<p>This CSS2 attribute selector matches any paragraph element that belongs to the class <code>literary</code>. To be more specific, it matches paragraphs whose <code>class</code> attribute is a space-separated list of words, one of which is exactly equal to “literary”.</p>
<p>In other words, it will match all of the following paragraphs:</p>
<div class="igBar"><span id="lcss-62"><a href="#" onclick="javascript:showPlainTxt('css-62'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CSS:</span>
<div id="css-62">
<div class="css">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;p class=<span style="color: #ff0000;">"literary"</span>&gt;…&lt;/p&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;p class=<span style="color: #ff0000;">"rather literary"</span>&gt;…&lt;/p&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;p class=<span style="color: #ff0000;">"literary you bet"</span>&gt;…&lt;/p&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;p class=<span style="color: #ff0000;">"somewhat literary sometimes"</span>&gt;…&lt;/p&gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>But it doesn't match either of the following paragraphs:</p>
<div class="igBar"><span id="lcss-63"><a href="#" onclick="javascript:showPlainTxt('css-63'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CSS:</span>
<div id="css-63">
<div class="css">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;p class=<span style="color: #ff0000;">"quasi-literary"</span>&gt;…&lt;/p&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;p class=<span style="color: #ff0000;">"literaryrary"</span>&gt;…&lt;/p&gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>“Hold on!” I hear you cry, “that's just like <code>p.literary</code>, isn't it?” Indeed it is. That's why I said before that the class selector is really just a special case of an attribute selector. Class selectors only match <code>class</code> attributes, though, while the full syntax can be used for any space-separated attribute value, like <code>td[headers~="price"]</code>.</p>
<p><code>[lang|="en"]</code></p>
<p>This CSS2 attribute selector matches any element whose natural language is specified as English. To be more specific, it matches elements whose <code>lang</code> attribute is a hyphen-separated list of words beginning with “en”.</p>
<p>In other words, it will match all of the following elements:</p>
<div class="igBar"><span id="lcss-64"><a href="#" onclick="javascript:showPlainTxt('css-64'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CSS:</span>
<div id="css-64">
<div class="css">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;div lang=<span style="color: #ff0000;">"en"</span>&gt;…&lt;/div&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;html lang=<span style="color: #ff0000;">"en-US"</span>&gt;…&lt;/html&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;blockquote lang=<span style="color: #ff0000;">"en-gb"</span>&gt;…&lt;/blockquote&gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>But it doesn't match an element with <code>lang="sv"</code> or <code>lang="fr-be"</code>.</p>
<p>The CSS2.1 specification doesn't state whether it's allowed to use a value that contains a hyphen with this syntax (like <code>[lang|="en-gb"]</code>). Browsers generally accept it, though.</p>
<p>This flavor is similar – but not equivalent – to the <code>:lang()</code> pseudo-class selector, which isn't supported by IE7 or Safari. The main difference is that the pseudo-class selector also matches elements that have inherited the language value from an ancestor element.</p>
<h3>Partial Attribute Value</h3>
<p><code>a[href^="http:"]</code></p>
<p>This CSS3 attribute selector matches link elements whose <code>href</code> attribute value <em>starts</em> with the string “http:”.</p>
<p><code>img[src$=".png"]</code></p>
<p>This CSS3 attribute selector matches image elements whose <code>src</code> attribute values <em>ends</em> with the string “.png”.</p>
<p><code>input[name*="choice"]</code></p>
<p>This CSS3 attribute selector matches any <code>input</code> element whose <code>name</code> attribute value <em>contains</em> the string “choice”.</p>
<h2>Words of Warning</h2>
<p>There must be no white space between a type selector (or universal selector) and an attribute selector meant to modify it. White space is the descendant combinator in CSS, so <code>a&#160;[href]</code> means <code>a&#160;*[href]</code>, which is something quite different from <code>a[href]</code>.</p>
<p>Some attributes in HTML and XHTML have default values: values which will apply even if the attribute isn't even specified for an element. One example is the <code>method</code> attribute for <code>form</code> elements, which defaults to <code>method="get"</code> if omitted.</p>
<p>Attribute selectors in CSS are only guaranteed to match attributes and values that are explicitly specified. The selector <code>form[method="get"]</code> is <em>not</em> guaranteed to to match a form element with a start tag like <code>&lt;form action="vote.php"&gt;</code>.</p>
<p>There are also some issues concerning value matching of minimized attributes.  Attribute minimization is an SGML feature that is commonly supported for certain attributes in HTML (but not XHTML). A minimized attribute consists solely of the attribute <em>value</em>; the name and equals sign are omitted. For instance, <code>&lt;select multiple&gt;</code> is equivalent to <code>&lt;select&#160;multiple="multiple"&gt;</code>.</p>
<p>Firefox and other Gecko browsers treat a minimized attribute as if it were specified as an empty string (<code>multiple=""</code>). Opera, on the other hand, treats it as if it were specified as <code>multiple="true"</code>.</p>
<h2>But What About IE6?</h2>
<p>Right, this all sounds lovely, but IE6 and older don't support attribute selectors and are still used by several million people. Isn't this just an exercise in futility?</p>
<p>It's not. I wouldn't have bothered writing this article if it were.</p>
<p>Of course we cannot <em>rely</em> on attribute selectors any time soon. What we can do, however, is to use them for progressive enhancement – adding value for modern browsers without causing any harm to older browsers.</p>
<p>My earlier example on how to style form buttons, for instance, shows one way to progressively enhance the aesthetics. In IE7, Firefox and Opera, buttons will be blue, while in IE6 they will have the default Windows look. Safari doesn't allow styling of form controls, so it will retain the native look, too, although it does support attribute selectors.</p>
<p>The point is that we <em>can</em> use attribute selectors today. As the market share for IE5 and IE6 diminishes, attribute selectors will become more and more useful and our markup can become leaner and cleaner.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.search-this.com/2007/11/14/hip-to-be-square/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>When to Fire a Client</title>
		<link>http://www.search-this.com/2007/10/03/when-to-fire-a-client/</link>
		<comments>http://www.search-this.com/2007/10/03/when-to-fire-a-client/#comments</comments>
		<pubDate>Wed, 03 Oct 2007 13:41:06 +0000</pubDate>
		<dc:creator>ses5909</dc:creator>
				<category><![CDATA[Stuff]]></category>
		<category><![CDATA[Website Design]]></category>

		<guid isPermaLink="false">http://www.search-this.com/2007/10/03/when-to-fire-a-client/</guid>
		<description><![CDATA[I've been working with clients for almost five years and have had varied experiences with my clients; some good, some average and some I hope to never work with again. All that said, all of my clients have been satisfied with my work. But last month I did something that I haven't ever had to [...]]]></description>
			<content:encoded><![CDATA[<p>I've been working with clients for almost five years and have had varied experiences with my clients; some good, some average and some I hope to never work with again. All that said, all of my clients have been satisfied with my work. But last month I did something that I haven't ever had to do before, I fired a client. </p>
<p>The project was a redevelopment of a very large community to include implementing a new design by the client. The redevelopment included porting over old functionality into new code, implementing several new features, and integrating a new design that was provided to me and my partner by the client. We worked on the project for several months and had a pretty good relationship with the client. </p>
<p>We were about 90% done with the project and were wrapping up a lot of things. The client asked us to implement something and I really didn't understand what he was asking for so he told me he would show me an example. He took me to a link and when I clicked on the link, my stomach sank. I was looking at an exact duplicate of the site we were creating except for some slight color changes. I immediately went to <a href="http://www.domaintools.com">Domain Tools</a> to check how long that site had been up. My initial thought was the other website somehow copied his. The idea that he copied this website design and it's functionality hadn't crossed my mind until I saw the website had been in existence for a couple of years. </p>
<p>I said to the client, "This site looks just like yours!" and he wasn't sure what I was talking about and we went back and forth on whether it looked just like his site and finally he admitted that he had taken a screenshot of the design and completely copied it. I felt very disappointed and somewhat deceived actually. Here is someone I grew to know and had regular conversations with, yet he hadn't been honest with me. I immediately started thinking about the project. We were so close to being done, yet it now turned into something that we could never put in our portfolio. That wasn't the biggest issue though; it was the unethical actions the client took, didn't disclose to us, and brought us in as an unknowing party to this. At this point I needed to decide whether we would continue with the project or stop where we were and hand over the code.</p>
<p>I took some time to think about it and talked it over with my partner as well as some colleagues. We really just wanted to finish the project but we didn't want to do anything that could hurt our business. A big factor in our decision was to think about it as a new project. If the client would have come to us in the beginning and told us that he wanted to completely rip this site's design and functionality, would we have accepted it? The answer was definitely not. </p>
<p>We have a clause in all of our contracts that basically says that either party can cancel the contract for any reason. We simply must give them the code and they pay anything that is due for that code. So, that is what we did. This isn't something we wanted to do, but we don't want to work with people who aren't honest with us and who we feel are unethical as it can hurt our business. I still feel a slight conflict about firing the client as I really wanted to finish the project because it was a pretty cool one, but it just wasn't worth it, so we handed over all of the code.</p>
<p>As I said in the beginning, I've been in business for 5 years and never had to worry about something like this before, but it is something every developer should consider and be prepared for. The first thing to do is make sure you have a contract and in that contract give yourself a way out if you ever encounter a situation similar to mine. This clause should also protect the client if they are unhappy with your performance for any reason. </p>
<p>So how do you decide when to fire a client? It really comes down to your business and how you want to run it. If the client has asked you to do something that could affect your business poorly, this should raise a red flag. It isn't a decision that should be taken lightly and only done in situations that you feel very strongly about. </p>
<p><strong>Have you ever had to fire a client? What would you have done in my situation?</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.search-this.com/2007/10/03/when-to-fire-a-client/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	</channel>
</rss>
