<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/rss2full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>CSS-Tricks</title>
	
	<link>http://css-tricks.com</link>
	<description>Tips, Tricks, and Techniques on using Cascading Style Sheets.</description>
	<pubDate>Fri, 18 Jul 2008 12:45:25 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<creativeCommons:license>http://creativecommons.org/licenses/by/2.0/</creativeCommons:license><image><link>http://css-tricks.com</link><url>http://css-tricks.com/images/header.gif</url><title>CSS-Tricks</title></image><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/CssTricks" type="application/rss+xml" /><feedburner:emailServiceId>1026108</feedburner:emailServiceId><feedburner:feedburnerHostname>http://www.feedburner.com</feedburner:feedburnerHostname><item>
		<title>Designing for WordPress: Complete Series &amp; Downloads</title>
		<link>http://feeds.feedburner.com/~r/CssTricks/~3/338973752/</link>
		<comments>http://css-tricks.com/designing-for-wordpress-complete-series-downloads/#comments</comments>
		<pubDate>Fri, 18 Jul 2008 12:45:25 +0000</pubDate>
		<dc:creator>Chris Coyier</dc:creator>
		
		<category><![CDATA[Quick Tip / Trick]]></category>

		<guid isPermaLink="false">http://css-tricks.com/?p=823</guid>
		<description><![CDATA[Over the last few weeks, I have been been doing a video screencast series on Designing for WordPress. It is a three-part series which covers downloading and installing WordPress on a server all the way to a completed theme. 
Part One: Download, Install, &#8220;Reset&#8221; Theme
Video Page
Direct Video Download (.mov)
Article &#038; Discussion
Part Two: Structure
Video Page
Direct Video [...]]]></description>
			<content:encoded><![CDATA[<p>Over the last few weeks, I have been been doing a video screencast series on Designing for WordPress. It is a three-part series which covers downloading and installing WordPress on a server all the way to a completed theme. </p>
<h4>Part One: Download, Install, &#8220;Reset&#8221; Theme</h4>
<p><a href="http://css-tricks.com/videos/css-tricks-video-25.php">Video Page</a><br />
<a href="http://vnfiles.ign.com/ects/css-tricks/VideoCast-25.mov">Direct Video Download (.mov)</a><br />
<a href="http://css-tricks.com/new-screencast-designing-for-wordpress-part-one/">Article &#038; Discussion</a></p>
<h4>Part Two: Structure</h4>
<p><a href="http://css-tricks.com/videos/css-tricks-video-26.php">Video Page</a><br />
<a href="http://vnfiles.ign.com/ects/css-tricks/VideoCast-26.mov">Direct Video Download (.mov)</a><br />
<a href="http://css-tricks.com/new-screencast-designing-for-wordpress-part-two/">Article &#038; Discussion</a></p>
<h4>Part 3: Finishing Touches, Extra Stuff</h4>
<p><a href="http://css-tricks.com/videos/css-tricks-video-27.php">Video Page</a><br />
<a href="http://vnfiles.ign.com/ects/css-tricks/VideoCast-27.mov">Direct Video Download (.mov)</a><br />
<a href="http://css-tricks.com/new-screencast-designing-for-wordpress-part-three/">Article &#038; Discussion</a></p>
<p>&nbsp;</p>
<h3>Download - &#8220;Personal Homepage Theme&#8221;</h3>
<p>I figured I might as well call it was it is! So the theme we were building this whole time now has a name: &#8220;Personal Homepage Theme&#8221;.  It looks like this:</p>
<p><img src="http://css-tricks.com/wp-content/csstricks-uploads/personalhomepagetheme.jpg" width="570" height="622" alt="" title="" /></p>
<p>I literally designed this for use on my personal site, so you can see it live on <a href="http://chriscoyier.net/">chriscoyier.net</a>.</p>
<p><a href="http://css-tricks.com/examples/PersonalHomepageTheme.zip" class="button"><span class="download">Download Theme</span></a></p>
<div class="clear"></div>
<p>&nbsp;</p>
<p><strong>Note:</strong> The orginal Photoshop file is included in the download in a folder called &#8220;orig&#8221; in the theme folder. The header of the site generically says &#8220;Your Name&#8221; instead of my name, but the sidebars have stuff in them still personalized to me. Of course feel free to change, alter and use this theme for any purpose. Link backs are always nice but not required.</p>
<p>In case you don&#8217;t already know. In order to use this theme you upload it into the /wp-content/themes/ folder of your WordPress install (you will need to use the self-hosted version of WordPress and have FTP access to your site). Then you can activate it under the &#8220;Design&#8221; section of the admin area.</p>
<p>&nbsp;</p>
<p><a href="http://www.cakemail.com"><img src="http://css-tricks.com/images/CakeMail-468x60_1.gif" alt="Email Marketing Software" /></a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/CssTricks?a=Nr2whJ"><img src="http://feeds.feedburner.com/~f/CssTricks?i=Nr2whJ" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/CssTricks?a=XYAygj"><img src="http://feeds.feedburner.com/~f/CssTricks?i=XYAygj" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/CssTricks?a=4yMg4j"><img src="http://feeds.feedburner.com/~f/CssTricks?i=4yMg4j" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/CssTricks/~4/338973752" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://css-tricks.com/designing-for-wordpress-complete-series-downloads/feed/</wfw:commentRss>

<enclosure url="http://vnfiles.ign.com/ects/css-tricks/VideoCast-26.mov" length="141391431" type="video/quicktime" />
<enclosure url="http://vnfiles.ign.com/ects/css-tricks/VideoCast-27.mov" length="163658609" type="video/quicktime" />
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=CssTricks&amp;itemurl=http%3A%2F%2Fcss-tricks.com%2Fdesigning-for-wordpress-complete-series-downloads%2F</feedburner:awareness><feedburner:origLink>http://css-tricks.com/designing-for-wordpress-complete-series-downloads/</feedburner:origLink><enclosure url="http://feeds.feedburner.com/~r/CssTricks/~5/339003035/VideoCast-25.mov" length="57500336" type="video/quicktime" /><feedburner:origEnclosureLink>http://vnfiles.ign.com/ects/css-tricks/VideoCast-25.mov</feedburner:origEnclosureLink></item>
		<item>
		<title>New Screencast: Designing for Wordpress: Part Three</title>
		<link>http://feeds.feedburner.com/~r/CssTricks/~3/338021717/</link>
		<comments>http://css-tricks.com/new-screencast-designing-for-wordpress-part-three/#comments</comments>
		<pubDate>Thu, 17 Jul 2008 12:45:11 +0000</pubDate>
		<dc:creator>Chris Coyier</dc:creator>
		
		<category><![CDATA[Quick Tip / Trick]]></category>

		<guid isPermaLink="false">http://css-tricks.com/?p=822</guid>
		<description><![CDATA[In part three of this series, we finish up the structure of the site and start diving into the details. The typography is set up, the right sidebar is set up, and the footer if flushed out. Then we use SimplePie to pull in the external RSS feed and jQuery to pull in the &#8220;social&#8221; [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>In part three of this series, we finish up the structure of the site and start diving into the details. The typography is set up, the right sidebar is set up, and the footer if flushed out. Then we use SimplePie to pull in the external RSS feed and jQuery to pull in the &#8220;social&#8221; stuff. Not exactly WordPress related, but I warned you! Then we look at styling up the rest of the WordPress layout types like Single pages (with comment styling) and Pages. At the end we pop open the design in a bunch of different browsers to see how it holds up.</p></blockquote>
<p><a href="http://css-tricks.com/videos/css-tricks-video-27.php"><img src="http://css-tricks.com/wp-content/csstricks-uploads/screencast-27-thumb.jpg" width="249" height="154" alt="" title="" /></a></p>
<p><strong>Fair warning</strong>: this is a long one again at almost a full hour. This will be the last one in the WordPress series, I will get all the files together and tidied up and make them available for download soon.</p>
<p><strong>Also note:</strong> I am doing a test on the video page this week. There is a bit of a new layout, which now includes links to things mentioned in the video. The video is also displayed in Flash video format instead of a Quicktime embed. This should help folks who have been having problems with viewing the videos online. The trade off here is that the file size is 3 times bigger (this week is a behemoth 315MB), and the quality is slightly worse.  Most of them won&#8217;t be this long, and hopefully I can figure out a way to get better compression and higher quality, because I think this will really the viewability of these things. The iTunes subscriptions and regular RSS feeds will still have regular links to .mov files.  Although&#8230; since those might not be used on the web anymore, I might turn them into .m4v files so they can be AppleTV compatible.</p>
<p>I&#8217;ll probably keep up with this Flash thing for a few weeks and see how it goes, if it works out, I&#8217;ll go back and do the rest of the archives like this.
<p><a href="http://www.cakemail.com"><img src="http://css-tricks.com/images/CakeMail-468x60_1.gif" alt="Email Marketing Software" /></a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/CssTricks?a=1MuvLJ"><img src="http://feeds.feedburner.com/~f/CssTricks?i=1MuvLJ" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/CssTricks?a=WGmmoj"><img src="http://feeds.feedburner.com/~f/CssTricks?i=WGmmoj" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/CssTricks?a=s02P7j"><img src="http://feeds.feedburner.com/~f/CssTricks?i=s02P7j" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/CssTricks/~4/338021717" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://css-tricks.com/new-screencast-designing-for-wordpress-part-three/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=CssTricks&amp;itemurl=http%3A%2F%2Fcss-tricks.com%2Fnew-screencast-designing-for-wordpress-part-three%2F</feedburner:awareness><feedburner:origLink>http://css-tricks.com/new-screencast-designing-for-wordpress-part-three/</feedburner:origLink></item>
		<item>
		<title>Why People Still Use IE 6</title>
		<link>http://feeds.feedburner.com/~r/CssTricks/~3/337039650/</link>
		<comments>http://css-tricks.com/why-people-still-use-ie-6/#comments</comments>
		<pubDate>Wed, 16 Jul 2008 12:45:53 +0000</pubDate>
		<dc:creator>Chris Coyier</dc:creator>
		
		<category><![CDATA[Quick Tip / Trick]]></category>

		<guid isPermaLink="false">http://css-tricks.com/?p=820</guid>
		<description><![CDATA[Internet Explorer 6 is always a hot subject of debate. We&#8217;ve talked about it here many many times. The forums are full of folks trying to troubleshoot it. The CSS support is problematic and the JavaScript support is proprietary nonsense. 
The conversation is heating up a little hotter than usual lately, as major companies are [...]]]></description>
			<content:encoded><![CDATA[<p>Internet Explorer 6 is always a hot subject of debate. We&#8217;ve talked about it here many many times. The forums are full of folks trying to troubleshoot it. The CSS support is problematic and the JavaScript support is proprietary nonsense. </p>
<p>The conversation is heating up a little hotter than usual lately, as major companies are starting to pull support for it. Apple&#8217;s new <a href="http://me.com">MobileMe</a> service doesn&#8217;t support it. 37 signals is <a href="http://37signals.blogs.com/products/2008/07/basecamp-phasin.html">phasing out support</a> for it. Matt Mullenweg says WordPress.com is <a href="http://ma.tt/2008/07/ie6-independence/">still seeing about 25%</a> of visits from IE 6 but will consider phasing out when it drops below 10%.</p>
<p>I thought I would start the conversation by covering the reasons I think people still use this browser. The percentages I am applying here are just for fun and <strong>complete speculation</strong> on my part. Feel free to chime in with comments on why you think so many people are still using this browser.</p>
<p>&nbsp;</p>
<h3>1. Because they have to (30%)</h3>
<p>I hear fairly regularly from people using IE 6 because <strong>that&#8217;s what is on their computer at work</strong> and they are not allowed to change it. Big companies are slow to change, that has always been true. I&#8217;m no security expert, but I&#8217;m told IE 7 is a much more secure browser, I would think that alone would be intensive for big companies to get their employees on IE 7. But still, from an IT perspective, I can understand how rolling out a change like this can take tons of man hours for seemingly little benefit, especially if using the web isn&#8217;t core to the companies business.</p>
<p>People might also hold onto IE 6 because they use a website that either does, or claims to, only work on that browser. These websites are getting fewer and far between but they are certainly out there.</p>
<p>&nbsp;</p>
<h3>2. Because they have an old computer. (20%)</h3>
<p>If they are using Windows 2000 IE 6 is the most current browser for that operating system as far as I know. Not to mention ME and 98. </p>
<p>&nbsp;</p>
<h3>3. Because they actively don&#8217;t care / dislike change (35%)</h3>
<p>I say &#8220;actively&#8221; because if they just &#8220;passively&#8221; don&#8217;t care, Windows has probably automatically upgraded them without them even knowing. If they are actively not caring, they are probably clicking &#8220;No&#8221; and &#8220;Cancel&#8221; on whatever dialog boxes come up suggesting upgrades. They are probably creating more work for themselves by doing so, but they don&#8217;t know that. </p>
<p>If anything <strong>does</strong> change on their system, they may even take drastic steps to have it restored to it&#8217;s original version. I bet Geek Squad people could tell your stories of people demanding their web browser be returned to IE 6 after accidentally upgrading. People get used to using software in a certain way to get what they need to do done, and they are prone to getting upset if anything interrupts that.</p>
<p>&nbsp;</p>
<h3>4. Because they don&#8217;t know any better (15%)</h3>
<p>I believe this is the smallest portion. People that could or would upgrade to a better browser, if convinced, but just don&#8217;t know the advantages yet. </p>
<p>&nbsp;</p>
<h3>Noticeably missing from this list:</h3>
<p>&#8220;Because they want to.&#8221;   I bet there are some crazies out there that love IE 6, but this is sub 1%. </p>
<p>&nbsp;</p>
<h3>What do these things all have in common?</h3>
<p><strong>There is very little we can do</strong>. We can educate people about the advantages of better browsers, but a lot of times we are just preaching to the choir or talking to deaf ears. The realit is, as we probably all know deep down, is that we are just going to have to wait this out. In a few years we&#8217;ll see probably lower than 10% usage across the board. Then we&#8217;ll be upset about a whole new set of things we want to use but are upset IE 7 doesn&#8217;t support!
<p><a href="http://www.cakemail.com"><img src="http://css-tricks.com/images/CakeMail-468x60_1.gif" alt="Email Marketing Software" /></a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/CssTricks?a=QyB62J"><img src="http://feeds.feedburner.com/~f/CssTricks?i=QyB62J" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/CssTricks?a=BhVmpj"><img src="http://feeds.feedburner.com/~f/CssTricks?i=BhVmpj" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/CssTricks?a=6NKTGj"><img src="http://feeds.feedburner.com/~f/CssTricks?i=6NKTGj" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/CssTricks/~4/337039650" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://css-tricks.com/why-people-still-use-ie-6/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=CssTricks&amp;itemurl=http%3A%2F%2Fcss-tricks.com%2Fwhy-people-still-use-ie-6%2F</feedburner:awareness><feedburner:origLink>http://css-tricks.com/why-people-still-use-ie-6/</feedburner:origLink></item>
		<item>
		<title>Links of Interest</title>
		<link>http://feeds.feedburner.com/~r/CssTricks/~3/336052126/</link>
		<comments>http://css-tricks.com/links-of-interest-39/#comments</comments>
		<pubDate>Tue, 15 Jul 2008 12:45:38 +0000</pubDate>
		<dc:creator>Chris Coyier</dc:creator>
		
		<category><![CDATA[Quick Tip / Trick]]></category>

		<guid isPermaLink="false">http://css-tricks.com/?p=819</guid>
		<description><![CDATA[Shirts for Coders
A collection of HTML/CSS T-Shirts. Some are funnier than others&#8230; I do like the XHTML one =)  I did a roundup of CSS shirts a while ago too.
&#160;
BgPatterns
As far as these &#8220;generators&#8221; go, this BgPatterns is pretty top-notch. Customize colors, textures, patterns, sizing, rotation&#8230; Preview it live on the page, save it, [...]]]></description>
			<content:encoded><![CDATA[<h3>Shirts for Coders</h3>
<p>A collection of <a href="http://www.shirtsforcoders.com/">HTML/CSS T-Shirts</a>. Some are funnier than others&#8230; I do like the XHTML one =)  I did a <a href="http://css-tricks.com/9-awesome-css-themed-t-shirts/">roundup of CSS shirts </a>a while ago too.</p>
<p>&nbsp;</p>
<h3>BgPatterns</h3>
<p>As far as these &#8220;generators&#8221; go, this <a href="http://bgpatterns.com/">BgPatterns</a> is pretty top-notch. Customize colors, textures, patterns, sizing, rotation&#8230; Preview it live on the page, save it, or download it.</p>
<p>&nbsp;</p>
<h3>WooThemes</h3>
<p>There is a slew of free WordPress themes out there, which is awesome, but I am a big fan of &#8220;Premium&#8221; themes as well. Design work is worth money and when you pay for something, you have a better shot at getting a higher quality product. I was even considering one of the &#8220;Premium News&#8221; themes for CSS-Tricks at one point and still think that one is really nice. The creators of that original theme have now rolled it over and expanded it into <a href="http://www.woothemes.com/">WooThemes</a>. It is no longer a pay-per-theme but is now a subscription service, starting at 3 months for $150 for a single user subscription. Looks like they have 10 themes right now and they all look great. There will be at least one theme added every month and they even have the fabulous designer Elliot Jay Stocks on board.<br />
<span id="more-819"></span></p>
<p>&nbsp;</p>
<h3>Check all checkboxes with jQuery</h3>
<p>Anytime there is multiple checkboxes in a form (say, four or more) there really should be an option to &#8220;check all&#8221; and &#8220;uncheck all&#8221;. Here is <a href="http://www.iknowkungfoo.com/blog/index.cfm/2008/7/9/Check-All-Checkboxes-with-JQuery">how you can do it with jQuery</a>.</p>
<p>&nbsp;</p>
<h3>Handwritten Typographers</h3>
<p>Every wonder what the <a href="http://www.themaninblue.com/articles/handwritten_typographers/">handwriting of the designers</a> behind popular typefaces are? I wish Dino dos Santos would make his own handwriting into a font, it&#8217;s very nice.</p>
<p>&nbsp;</p>
<h3>Engine Room</h3>
<p>There is totally going to be an <a href="http://www.mtvengineroom.com/">MTV reality series on designers</a>.</p>
<p><a href="http://www.cakemail.com"><img src="http://css-tricks.com/images/CakeMail-468x60_1.gif" alt="Email Marketing Software" /></a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/CssTricks?a=DjGQYJ"><img src="http://feeds.feedburner.com/~f/CssTricks?i=DjGQYJ" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/CssTricks?a=SwG1lj"><img src="http://feeds.feedburner.com/~f/CssTricks?i=SwG1lj" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/CssTricks?a=NGhknj"><img src="http://feeds.feedburner.com/~f/CssTricks?i=NGhknj" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/CssTricks/~4/336052126" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://css-tricks.com/links-of-interest-39/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=CssTricks&amp;itemurl=http%3A%2F%2Fcss-tricks.com%2Flinks-of-interest-39%2F</feedburner:awareness><feedburner:origLink>http://css-tricks.com/links-of-interest-39/</feedburner:origLink></item>
		<item>
		<title>How To Create a Horizontally Scrolling Site</title>
		<link>http://feeds.feedburner.com/~r/CssTricks/~3/335066378/</link>
		<comments>http://css-tricks.com/how-to-create-a-horizontally-scrolling-site/#comments</comments>
		<pubDate>Mon, 14 Jul 2008 12:45:41 +0000</pubDate>
		<dc:creator>Chris Coyier</dc:creator>
		
		<category><![CDATA[Quick Tip / Trick]]></category>

		<guid isPermaLink="false">http://css-tricks.com/?p=166</guid>
		<description><![CDATA[
If web pages were made out of wood, the grain would be running up and down. Vertical is the natural flow of web layout. When page elements reach the right edge of the browser window and go over, the  flow defaults to &#8220;wrapping&#8221; that element down onto the next line. The more content on [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://css-tricks.com/wp-content/csstricks-uploads/horzscrolling.png" width="570" height="244" alt="" title="" /></p>
<p>If web pages were made out of wood, the grain would be running up and down. Vertical is the natural flow of web layout. When page elements reach the right edge of the browser window and go over, the  flow defaults to &#8220;wrapping&#8221; that element down onto the next line. The more content on the page, the taller it gets, not the wider. Why is this? Because it just makes sense. Our eyes are used to reading fairly short lines of text, so if we were to see a paragraph of text in one long straight line, it would be painful to read. Paragraphs need to have line breaks in them to be readable (hence the term &#8220;blocks&#8221; of text). We sure as heck don&#8217;t want to hard-code line breaks into the markup ourselves. Obviously, we don&#8217;t have to, the browser does this wrapping for us. Thus the vertical expansion.</p>
<p>This natural flow has lead to conventions in web page layout and even into hardware itself. Notice how many computer mice (mouses?) have a special scroller exclusively for vertical scrolling. But web pages are equipped with both vertical AND horizontal scrollbars right? If we are responsible with our web layout, we can go &#8220;against the grain&#8221; and create web pages that use primarily horizontal scrolling  and can even expand horizontally as we add more content. Perhaps a slight blow to &#8220;useability&#8221;, but it sure can be a cool creative touch!</p>
<p><a href="http://css-tricks.com/examples/HorzScrolling" class="button"><span class="demo">View Demo</span></a> <a href="http://css-tricks.com/examples/HorzScrolling.zip" class="button"><span class="download">Download Files</span></a></p>
<div class="clear"></div>
<p>&nbsp;</p>
<h3>The best way to do it</h3>
<p>I&#8217;m going to go out on a limb here and say that I think a table is the best layout technique for a horizontally scrolling site. Before I explain why, let&#8217;s look at a couple of other possible techniques:</p>
<p><span id="more-166"></span></p>
<ul>
<li><strong>Set a really wide static width.</strong>  Perhaps the &#8220;quick and dirtiest&#8221; way to get a horizontal layout started is just to set a really wide static width on the body element itself. Say, 10000px. Go ahead and try it, you&#8217;ll surely get a horizontal scrollbar. While this works, it&#8217;s a bit inflexible. Web pages are dynamic places and we should be prepared for expandability, not limiting ourselves with static widths. Think about regular vertical scrolling sites. You don&#8217;t go around setting static heights on your pages do you?</li>
<li><strong>Floats + Whitespace.</strong> I spent some time playing with the float property and the whitespace property to see if I could find a way to fight browser auto-wrapping, but I didn&#8217;t have much luck. Page elements which are floated but do not have a width exhibit a property where they expand to the width of the content inside them. I thought perhaps if I put a bunch of float elements inside of that, it might just keep expanding beyond the width of the browser window. No dice. There is also a whitespace: nowrap; property in CSS which I thought might be able to be exploited to fight the auto-wrapping, but it only works for text elements, not blocks or just any old thing you set to inline. Oh well.</li>
<li><strong>Use JavaScript to set a width.</strong> JavaScript clearly has the ability to manipulate page elements and do calculations on-the-fly. We could use this to create an environment which behaves extensibly. However, it considered bad mo-jo to handle page layout with JavaScript. I agree with this in general, but I do believe you can use JavaScript in this way as long you do so unobtrusively and take care to ensure the page will fall back to a usable layout with JavaScript disabled.</li>
</ul>
<p>&nbsp;</p>
<h3>The table method</h3>
<p>What we need is a page element which can expand horizontally as needed and never &#8220;wrap&#8221;. A row of table cells fit the bill perfectly here. Table cells will expand to fit whatever content is inside them by their nature, and the will never wrap until a new row is started. Perfect.</p>
<p>Let&#8217;s assume we are trying to lay out a series of blog posts one after another horizontally. We would need to use a page structure like this:</p>
<pre><code>&lt;table&gt;
  &lt;tr&gt;
    &lt;td&gt;
       ..  blog post #1
    &lt;/td&gt;
    &lt;td&gt;
       ..  blog post #2
    &lt;/td&gt;
    &lt;td&gt;
       ..  blog post #3
    &lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;</code></pre>
<p>Yuck, right? It never feels good to use markup like that, not just because it&#8217;s a table, but also because of how non-semantic it is. We are using a bunch of tags here which are exclusively for presentation and have nothing to do with content. </p>
<p>Ideally, our page structure would be like this:</p>
<pre><code>&lt;div class="post"&gt;
  .. blog post #1 ..
&lt;/div&gt;
&lt;div class="post"&gt;
  .. blog post #2 ..
&lt;/div&gt;
&lt;div class="post"&gt;
  .. blog post #3 ..
&lt;/div&gt;</code></pre>
<p>Using jQuery, we can easily have the best of both worlds!</p>
<p>&nbsp;</p>
<h3>Write the markup we want, get the markup we need</h3>
<p>We are going to use jQuery to allow us to the markup we want (the div structure) and manipulate it to get the markup we need for horizontally scrolling (the table structure). You should have little alarms going off in your head here about using JavaScript for layout, but rest easy, we will ensure that without JavaScript enabled the layout will be perfectly useable. As an added bonus, the layout will be useable with or without CSS enabled as well, and any combination.</p>
<p>Let&#8217;s first think through what we want to happen:</p>
<ul>
<li>Wrap ALL of the posts in a single table tag and single row tag</li>
<li>Wrap EACH post in a table cell tag</li>
</ul>
<p>Now let&#8217;s include jQuery on our page in the head section, and write the jQuery we need to get this done.</p>
<pre><code class="html">&lt;script src="js/jquery-1.2.6.min.js" type="text/javascript" charset="utf-8"&gt;&lt;/script&gt;
&lt;script type="text/javascript" charset="utf-8"&gt;
	$(function(){
		$("#page-wrap").wrapInner("&lt;table cellspacing='30'&gt;&lt;tr&gt;");
		$(".post").wrap("&lt;td&gt;");
	});
&lt;/script&gt;</code></pre>
<p>That should do it! Notice how the cellspacing is added as an inline attribute to the table element. We might normally apply padding to cells with CSS, but we want to make sure that each blog post block is  as readable as possible even with CSS turned off. Without this, the blocks would butt right up against each other making them tough to read.</p>
<p>The entire CSS file for this example is very very simple:</p>
<pre><code>/*
	RESET &amp; BASIC SETUP
*/
* 						{ margin: 0; padding: 0; }
body 						{ font-size: 62.5%;
							 font-family: 'Lucida Grande', Helvetica, sans-serif;
							 background: #121212; padding: 20px; color: #999; }
table tr					{ vertical-align: top; }
/*
	STRUCTURE
*/
.post 						{ width: 500px; }

/*
	TYPOGRAPHY
*/
p						{ font-size: 1.2em; margin: 0 0 15px 0; }
h1						{ font-family: Helvetica, sans-serif; font-size: 4.0em;
							 letter-spacing: -1px; color: #ccc; }
h2						{ font-family: Helvetica, sans-serif; font-size: 3.0em;
							 letter-spacing: -1px; color: #ccc; }
a						{ color: #0066cc; }
a:hover						{ color: #ccc; }</code></pre>
<p>Only a few things worth noting. The static width on the .post div controls the width of each block. The vertical-align property on the table row keeps each of the blocks aligned to the top of their table cells. This defaults to middle, so this is necessary.</p>
<p>&nbsp;</p>
<h3>The Results</h3>
<p>With CSS and JavaScript both on (99% of users), we&#8217;ll have a nicely executed horizontally scrolling site. With CSS and JavaScript both off (screen readers), the structure of the individual blog posts rule the page, assuming they are semantically marked up, the page will look great. The only quirk here is if JavaScript is on and CSS is off (RARE), the page looks a little bizarre.</p>
<p><a href="http://css-tricks.com/examples/HorzScrolling" class="button"><span class="demo">View Demo</span></a> <a href="http://css-tricks.com/examples/HorzScrolling.zip" class="button"><span class="download">Download Files</span></a></p>
<div class="clear"></div>
<p>&nbsp;</p>
<h3>Other techniques for horizontal scrolling</h3>
<p>Literally expanding the width of your page and using scrollbars to navigate it is only one way to achieve the horizontally scrolling effect. <a href="http://css-tricks.com/javascript-page-slider-roundup/">Javascript sliders</a> are another route you could take, which simulate the effect. Flash would be another possibility. When it comes to web design, there is always many ways!</p>
<p>&nbsp;</p>
<h3>Examples of nicely designed horizontally scrolling sites</h3>
<ul>
<li><a href="http://www.normacordova.com/">norma cordova photography</a></li>
<li><a href="http://www.jodi.com/portfolio/index.php">jodi moore | portfolio</a></li>
<li><a href="http://blog.urbanoutfitters.com/">Urban Outfitters: Blog</a></li>
<li><a href="http://www.evanescenceuk.co.uk/index4.php">Evanescence</a></li>
<li><a href="http://www.nanadc.com/Summer06/nana.html">Nana</a></li>
<li><a href="http://www.lonnroth.info/beca/">Beca</a></li>
<li><a href="http://csszengarden.com/?cssfile=/058/058.css">Radio Zen</a></li>
<li><a href="http://www.thehorizontalway.com/">The Horizontal Way</a></li>
</ul>
<p><a href="http://www.cakemail.com"><img src="http://css-tricks.com/images/CakeMail-468x60_1.gif" alt="Email Marketing Software" /></a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/CssTricks?a=p5RLZJ"><img src="http://feeds.feedburner.com/~f/CssTricks?i=p5RLZJ" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/CssTricks?a=Vdinwj"><img src="http://feeds.feedburner.com/~f/CssTricks?i=Vdinwj" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/CssTricks?a=KeMHOj"><img src="http://feeds.feedburner.com/~f/CssTricks?i=KeMHOj" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/CssTricks/~4/335066378" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://css-tricks.com/how-to-create-a-horizontally-scrolling-site/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=CssTricks&amp;itemurl=http%3A%2F%2Fcss-tricks.com%2Fhow-to-create-a-horizontally-scrolling-site%2F</feedburner:awareness><feedburner:origLink>http://css-tricks.com/how-to-create-a-horizontally-scrolling-site/</feedburner:origLink></item>
		<item>
		<title>Image Map with Prototype Tooltips</title>
		<link>http://feeds.feedburner.com/~r/CssTricks/~3/332652960/</link>
		<comments>http://css-tricks.com/image-map-with-prototype-tooltips/#comments</comments>
		<pubDate>Fri, 11 Jul 2008 12:45:15 +0000</pubDate>
		<dc:creator>Chris Coyier</dc:creator>
		
		<category><![CDATA[Quick Tip / Trick]]></category>

		<guid isPermaLink="false">http://css-tricks.com/?p=816</guid>
		<description><![CDATA[The areas inside of regular ol&#8217; HTML image maps support the title attribute which makes regular tooltips possible. Sometimes the default browser tooltips just don&#8217;t cut it, especially with their built in delays. 
My favorite package for doing fancy tooltips is Prototip for the Prototype javascript framework. Prototip is free to download but requires a [...]]]></description>
			<content:encoded><![CDATA[<p>The <em>areas</em> inside of regular ol&#8217; HTML image maps support the <em>title</em> attribute which makes regular tooltips possible. Sometimes the default browser tooltips just don&#8217;t cut it, especially with their built in delays. </p>
<p>My favorite package for doing fancy tooltips is <a href="http://www.nickstakenburg.com/projects/prototip2/">Prototip</a> for the Prototype javascript framework. Prototip is free to download but requires a small licensing fee to use it on your domains. We will be using only a tiny fraction of what Prototip is capable of here, but hopefully this demo will open up the door of possibility should you need to do something like this.</p>
<p><a href="http://css-tricks.com/examples/ImageMapTooltips" class="button"><span class="demo">View Demo</span></a> <a href="http://css-tricks.com/examples/ImageMapTooltips.zip" class="button"><span class="download">Download Files</span></a></p>
<div class="clear"></div>
<p><span id="more-816"></span></p>
<h3>Image Mapping the Image</h3>
<p>Creating image maps is one of the few features I always pop open Dreamweaver to do. When you have an image selected on your page in Dreamweaver, you get little tools in order to draw the <em>areas</em> directly onto the image.</p>
<p><img src="http://css-tricks.com/wp-content/csstricks-uploads/image-map-tools.jpg" width="570" height="499" alt="" title="" /></p>
<p>Can&#8217;t beat that for simplicity, trying to create areas without some kind of WYSIWYG editor would be a nightmare. Use this code as a starting point and then you can add <strong>unique ID&#8217;s</strong> to each area. You will need those unique ID&#8217;s to target with Prototip.  Your final code will be something like this:</p>
<pre><code>&lt;img src="images/image.jpg" alt="image" usemap="#Map" /&gt;
&lt;map name="Map" id="Map"&gt;
	&lt;area shape="circle" coords="147,131,12" href="#" id="tooltip-1"/&gt;
	&lt;area shape="circle" coords="178,169,12" href="#" id="tooltip-2" /&gt;
&lt;/map&gt;</code></pre>
<p>&nbsp;</p>
<h3>Adding Prototip</h3>
<p>You&#8217;ll need to include prototype and the prototip javascript files in your header, the use the new Tip function to create the tooltips for each ID.</p>
<pre><code class="html">&lt;script type='text/javascript' src='js/prototype.js'&gt;&lt;/script&gt;
&lt;script type='text/javascript' src='js/scriptaculous.js?load=effects'&gt;&lt;/script&gt;
&lt;script type='text/javascript' src='js/prototip.js'&gt;&lt;/script&gt;
&lt;script type='text/javascript'&gt;
	function init() {
	//&lt;![CDATA[
		new Tip('tooltip-1', '&lt;h3&gt;Content for Tooltip 1&lt;/h3&gt;', {title : '', className: 'silver', effect: 'slide', showOn: 'mousemove', hideOn: 'mouseout', fixed: true, hook:{target: 'topLeft', tip: 'bottomLeft'} });
		new Tip('tooltip-2', '&lt;h3&gt;Content for Tooltip 2&lt;/h3&gt;', {title : '', className: 'silver', effect: 'slide', showOn: 'mousemove', hideOn: 'mouseout', fixed: true, hook:{target: 'topLeft', tip: 'bottomLeft'} });
	//]]&gt;
	}
	Event.observe(window, 'load', init, false);
&lt;/script&gt;</code></pre>
<p>You can see in the code above some of the different options for Prototip. First of all, you target the ID and provide the HTML content for the tip. Then you can apply a class name, locational targeting, and change the events on which the tooltips trigger.</p>
<p>&nbsp;</p>
<h3>Tooltip CSS</h3>
<p>This example uses very very basic styling.</p>
<pre><code>.prototip 				{ position: absolute; }
.prototip .silver 			{ width: 733px; font-size: 1.8em; }
.prototip .silver .content 		{ text-align: center; padding: 10px 0; }</code></pre>
<p>Most importantly, you need absolute positioning applied to the .prototip element so that your tips can pop up where they are supposed to and not affect the layout flow of the document. Then through your applied class you can do the rest of your styling. This allows you to have different styling for different tooltips which is a great feature. Notice in the example we have &#8220;silver&#8221; as the class name. This is what is applied in the javascript and what the CSS is targeting.</p>
<p>So &#8212; the usual disclaimer applies here. There are lots of ways to do this. You can create <a href="http://cssglobe.com/articles/link_tech/01.html">pure CSS tooltips</a> if you&#8217;d like and I&#8217;m sure every major javascript framework has a solution of their own. My focus here to to show you can attach those tooltips to image maps through unique ID, which can be quite useful.</p>
<p><a href="http://bandwebsitetemplate.com">Band Website Template</a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/CssTricks?a=gOBi1J"><img src="http://feeds.feedburner.com/~f/CssTricks?i=gOBi1J" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/CssTricks?a=ZDfLwj"><img src="http://feeds.feedburner.com/~f/CssTricks?i=ZDfLwj" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/CssTricks?a=zz5Zqj"><img src="http://feeds.feedburner.com/~f/CssTricks?i=zz5Zqj" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/CssTricks/~4/332652960" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://css-tricks.com/image-map-with-prototype-tooltips/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=CssTricks&amp;itemurl=http%3A%2F%2Fcss-tricks.com%2Fimage-map-with-prototype-tooltips%2F</feedburner:awareness><feedburner:origLink>http://css-tricks.com/image-map-with-prototype-tooltips/</feedburner:origLink></item>
		<item>
		<title>New Screencast: Designing for WordPress: Part Two</title>
		<link>http://feeds.feedburner.com/~r/CssTricks/~3/331699462/</link>
		<comments>http://css-tricks.com/new-screencast-designing-for-wordpress-part-two/#comments</comments>
		<pubDate>Thu, 10 Jul 2008 12:45:46 +0000</pubDate>
		<dc:creator>Chris Coyier</dc:creator>
		
		<category><![CDATA[Quick Tip / Trick]]></category>

		<guid isPermaLink="false">http://css-tricks.com/?p=817</guid>
		<description><![CDATA[We have WordPress installed, now let&#8217;s really get our hands dirty and start getting WordPress to do what we want it to do. We start by poking around the backend activating some plugins, changing some settings and creating posts/pages. Then we take a look at the Photoshop design and note some of the important aspects. [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>We have WordPress installed, now let&#8217;s really get our hands dirty and start getting WordPress to do what we want it to do. We start by poking around the backend activating some plugins, changing some settings and creating posts/pages. Then we take a look at the Photoshop design and note some of the important aspects. Layout, color palette and font choices are all imporant things to consider as well as the overall feel. WordPress sites don&#8217;t need to scream &#8220;Blog!&#8221; unless you want them to. Then we take a look at the modular nature of a WordPress theme and start altering the markup of the files and writing CSS. In part three, we will continue touching up the design, adding details and content. We may get to the finishing touches of adding the &#8220;extra-content&#8221; stuff like the Twitter feed, or that might be a part four.</p></blockquote>
<p><a href="http://css-tricks.com/videos/css-tricks-video-26.php"><img src="http://css-tricks.com/wp-content/csstricks-uploads/screencast-26-thumb.jpg" width="249" height="154" alt="" title="" /></a></p>
<p>Special thanks to <a href="http://www.webdeneyimleri.com/">Volkan Görgülü</a> who sparked the idea for this design and provided a nice sketch I used while Photoshopping the design.
<p><a href="http://bandwebsitetemplate.com">Band Website Template</a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/CssTricks?a=6tZkJJ"><img src="http://feeds.feedburner.com/~f/CssTricks?i=6tZkJJ" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/CssTricks?a=vcyy5j"><img src="http://feeds.feedburner.com/~f/CssTricks?i=vcyy5j" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/CssTricks?a=n9182j"><img src="http://feeds.feedburner.com/~f/CssTricks?i=n9182j" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/CssTricks/~4/331699462" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://css-tricks.com/new-screencast-designing-for-wordpress-part-two/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=CssTricks&amp;itemurl=http%3A%2F%2Fcss-tricks.com%2Fnew-screencast-designing-for-wordpress-part-two%2F</feedburner:awareness><feedburner:origLink>http://css-tricks.com/new-screencast-designing-for-wordpress-part-two/</feedburner:origLink></item>
		<item>
		<title>The Difference Between ID and Class</title>
		<link>http://feeds.feedburner.com/~r/CssTricks/~3/330747214/</link>
		<comments>http://css-tricks.com/the-difference-between-id-and-class/#comments</comments>
		<pubDate>Wed, 09 Jul 2008 12:45:02 +0000</pubDate>
		<dc:creator>Chris Coyier</dc:creator>
		
		<category><![CDATA[Quick Tip / Trick]]></category>

		<guid isPermaLink="false">http://css-tricks.com/?p=818</guid>
		<description><![CDATA[ID&#8217;s and Classes are &#8220;hooks&#8221;
We need to ways to describe content in an HTML/XHTML document. The basic elements like &#60;h1&#62;, &#60;p&#62; and &#60;ul&#62; will often do the job, but our basic set of tags doesn&#8217;t cover every possible type of page element or layout choice. For this we need ID&#8217;s and Classes. For example &#60;ul [...]]]></description>
			<content:encoded><![CDATA[<h3>ID&#8217;s and Classes are &#8220;hooks&#8221;</h3>
<p>We need to ways to describe content in an HTML/XHTML document. The basic elements like &lt;h1&gt;, &lt;p&gt; and &lt;ul&gt; will often do the job, but our basic set of tags doesn&#8217;t cover every possible type of page element or layout choice. For this we need ID&#8217;s and Classes. For example &lt;ul id=&#8221;nav&#8221;&gt;, this will give us the chance to target this unordered list specifically, so that we may manipulate it uniquely to other unordered lists on our page. Or we might have a section on our page that has no relevant tag to signify it, for example a footer, where we might do something like this: &lt;div id=&#8221;footer&#8221;&gt;. Or perhaps we have boxes in our sidebar for keeping content over there separated in some way: &lt;div class=&#8221;sidebar-box&#8221;&gt;.</p>
<p><img src="http://css-tricks.com/wp-content/csstricks-uploads/hook2.jpg" width="570" height="150" alt="" title="" /></p>
<p>These ID&#8217;s and Classes the &#8220;hooks&#8221; we need to build into markup to get our hands on them. CSS obviously needs these so that we may build selectors and do our styling, but other web languages like Javascript depend on them too. But what is the difference between them?</p>
<p><span id="more-818"></span></p>
<p>&nbsp;</p>
<h3>ID&#8217;s are unique</h3>
<ul>
<li>Each element can have only one ID</li>
<li>Each page can have only one element with that ID</li>
</ul>
<p>When I was first learning this stuff, I heard over and over that you should only use ID&#8217;s once, but you can use classes over and over. It basically went in one ear and out the other because it sounded more like a good &#8220;rule of thumb&#8221; to me rather than something extremely important. If you are purely an HTML/CSS person, this attitude can persist because to you, they really don&#8217;t seem to do anything different.</p>
<p>Here is one: your code will not pass validation if you use the same ID on more than one element. Validation should be important to all of us, so that alone is a big one. We&#8217;ll go over more reasons for uniqueness as we go on.</p>
<p>&nbsp;</p>
<h3>Classes are NOT unique</h3>
<ul>
<li>You can use the same class on multiple elements.</li>
<li>You can use multiple classes on the same element.</li>
</ul>
<p>Any styling information that needs to be applied to multiple objects on a page should be done with a class. Take for example a page with multiple &#8220;widgets&#8221;:</p>
<pre><code>&lt;div class="widget"&gt;&lt;/div&gt;
&lt;div class="widget"&gt;&lt;/div&gt;
&lt;div class="widget"&gt;&lt;/div&gt;</code></pre>
<p>You can now use the class name &#8220;widget&#8221; as your hook to apply the same set of styling to each one of these. But what if you need one of them to be bigger than other other, but still share all the other attributes. Classes has you covered there, as you can apply more than one class:</p>
<pre><code>&lt;div class="widget"&gt;&lt;/div&gt;
&lt;div class="widget big"&gt;&lt;/div&gt;
&lt;div class="widget"&gt;&lt;/div&gt;</code></pre>
<p>No need to make a brand new class name here, just apply a new class right in the class attribute. These classes are space delimited and most browsers any number of them (actually, it&#8217;s more like thousands, but way more than you&#8217;ll ever need).</p>
<p>&nbsp;</p>
<h3>There are no browser defaults for any ID or Class</h3>
<p>Adding a class name or ID to an element does nothing to that element by default. </p>
<p>This is something that snagged me as a beginner. You are working on one site and figure out that applying a particular class name fixes a problem you are having. Then you jump over to another site with the same problem and try to fix it with that same class name thinking the class name itself has some magical property to it only to find out it didn&#8217;t work. </p>
<p>Classes and ID&#8217;s don&#8217;t have any styling information to them all by themselves. They require CSS to target them and apply styling.  </p>
<p>&nbsp;</p>
<h3>Barcodes and Serial Numbers</h3>
<p><img src="http://css-tricks.com/wp-content/csstricks-uploads/barcode-serialnumber.jpg" width="570" height="150" alt="" title="" /></p>
<p>Maybe a good analogy here is bar codes and serial numbers. Take an iPod in a store. On the packaging will be a bar code. This tells the store what the product is, so when it is scanned, the system knows exactly what the product is and what it costs. It might even be able to know what color it is or where it was kept in the store. All iPod of this same type have the exact same bar code on them.</p>
<p>The iPod will also have a serial number on it which is absolutely unique to any other iPod (or any other device) in the world. The serial number doesn&#8217;t know the price. It could, but for the store this wouldn&#8217;t be a very efficient way to store and use that data. Much easier to use the barcode, so that for example, if the price changed, you could just change the price for that bar code and not every individual serial number in your system.</p>
<p>This is much like ID&#8217;s and Classes. Information that is reuseable should be kept in a class and information that is totally unique should be kept in an ID.</p>
<p>&nbsp;</p>
<h3>ID&#8217;s have special browser functionality</h3>
<p>Classes have no special abilities in the browser, but ID&#8217;s do have one very important trick up their sleeve. This is the &#8220;hash value&#8221; in the URL. If you have a URL like http://yourdomain.com#comments, the browser will attempt to locate the element with an ID of &#8220;comments&#8221; and will automatically scroll the page to show that element. It is important to note here that the browser will scroll whatever element it needs to in order to show that element, so if you did something special like a scrollable DIV area within your regular body, that div will be scrolled too.</p>
<p>This is an important reason right here why having ID&#8217;s be absolutely unique is important. So your browser knows where to scroll!</p>
<h3>Elements can have BOTH</h3>
<p>There is nothing stopping you from having both an ID and a Class on a single element. In fact, it is often a very good idea. Take for example the default markup for a WordPress comment list item:</p>
<pre><code>&lt;li id="comment-27299" class="item"&gt;</code></pre>
<p>It has a class applied to it that you may want for styling all comments on the page, but it also has a unique ID value (dynamically generated by WordPress, nicely enough). This ID value is useful for direct linking. Now I can link directly do a particular comment on a particular page easily.</p>
<p>&nbsp;</p>
<h3>CSS doesn&#8217;t care</h3>
<p>Regarding CSS, there is nothing you can do with an ID that you can&#8217;t do with a Class and vise versa. I remember when I was first learning CSS and I was having a problem, sometimes I would try and troubleshoot by switching around these values. Nope. CSS doesn&#8217;t care.</p>
<p>&nbsp;</p>
<h3>Javascript cares</h3>
<p>JavaScript people are already probably more in tune with the differences between classes and ID&#8217;s. JavaScript depends on there being only one page element with any particular, or else the commonly used getElementById function wouldn&#8217;t be dependable. For those familiar with jQuery, you know how easy it is to add and remove classes to page elements. It is a native and built in function of jQuery. Notice how no such function exists for ID&#8217;s. It is not the responsibility of JavaScript to manipulate these values, it would cause more problems than it would be worth.</p>
<p>&nbsp;</p>
<h3>If you don&#8217;t need them, don&#8217;t use them</h3>
<p>As you can see, classes and ID&#8217;s are very important and we rely on them every day to do the styling and page manipulation that we need to do. However, you should use them judiciously and semantically.</p>
<p>This means avoiding things like this:</p>
<pre><code>&lt;a href="http://css-tricks.com" class="link"&gt;CSS-Tricks.com&lt;/a&gt;</code></pre>
<p>We already know this element is a link, it&#8217;s an anchor element! No particular need here to apply a class, as we can already apply styling via its tag.</p>
<p>Also avoid this:</p>
<pre><code>&lt;div id="right-col"&gt;</code></pre>
<p>ID is appropriately used here as the page will likely only have a single right column, but the name is inappropriate. Try and describe the context of the element, not where it is or what it looks like. An ID here of &#8220;sidebar&#8221; would be more appropriate.</p>
<p>&nbsp;</p>
<h3>Microformats are just specific class names</h3>
<p>Think microformats are over your head? They aren&#8217;t! They are just regular markup that make use of standardized class names for the information they contain. Check out a standard vCard:</p>
<pre><code>&lt;div class="vcard"&gt;
  &lt;a class="fn org url" href="http://www.commerce.net/"&gt;CommerceNet&lt;/a&gt;
  &lt;div class="adr"&gt;
    &lt;span class="type"&gt;Work&lt;/span&gt;:
    &lt;div class="street-address"&gt;169 University Avenue&lt;/div&gt;
    &lt;span class="locality"&gt;Palo Alto&lt;/span&gt;,
    &lt;abbr class="region" title="California"&gt;CA&lt;/abbr&gt;
    &lt;span class="postal-code"&gt;94301&lt;/span&gt;
    &lt;div class="country-name"&gt;USA&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="tel"&gt;
   &lt;span class="type"&gt;Work&lt;/span&gt; +1-650-289-4040
  &lt;/div&gt;
  &lt;div class="tel"&gt;
    &lt;span class="type"&gt;Fax&lt;/span&gt; +1-650-289-4041
  &lt;/div&gt;
  &lt;div&gt;Email:
   &lt;span class="email"&gt;info@commerce.net&lt;/span&gt;
  &lt;/div&gt;
&lt;/div&gt;</code></pre>
<p><a href="http://bandwebsitetemplate.com">Band Website Template</a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/CssTricks?a=RfpETJ"><img src="http://feeds.feedburner.com/~f/CssTricks?i=RfpETJ" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/CssTricks?a=xp1mYj"><img src="http://feeds.feedburner.com/~f/CssTricks?i=xp1mYj" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/CssTricks?a=6f1wDj"><img src="http://feeds.feedburner.com/~f/CssTricks?i=6f1wDj" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/CssTricks/~4/330747214" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://css-tricks.com/the-difference-between-id-and-class/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=CssTricks&amp;itemurl=http%3A%2F%2Fcss-tricks.com%2Fthe-difference-between-id-and-class%2F</feedburner:awareness><feedburner:origLink>http://css-tricks.com/the-difference-between-id-and-class/</feedburner:origLink></item>
		<item>
		<title>Links of Interest</title>
		<link>http://feeds.feedburner.com/~r/CssTricks/~3/329784237/</link>
		<comments>http://css-tricks.com/links-of-interest-38/#comments</comments>
		<pubDate>Tue, 08 Jul 2008 12:45:18 +0000</pubDate>
		<dc:creator>Chris Coyier</dc:creator>
		
		<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://css-tricks.com/?p=812</guid>
		<description><![CDATA[Best of June 2008
Noupe with another very nice monthly roundup of good design-y stuff around the web last month. I like these giant monthly roundup posts. Gives a good monthly goal of trying to write things that are worthy of being on it. Didn&#8217;t Smashing Magazine used to do monthly roundups and then just randomly [...]]]></description>
			<content:encoded><![CDATA[<h3>Best of June 2008</h3>
<p>Noupe with another <a href="http://www.noupe.com/best-of/websites-you-shouldnt-have-missed-in-june-2008.html">very nice monthly roundup</a> of good design-y stuff around the web last month. I like these giant monthly roundup posts. Gives a good monthly goal of trying to write things that are worthy of being on it. Didn&#8217;t Smashing Magazine used to do monthly roundups and then just randomly stopped?</p>
<p>&nbsp;</p>
<h3>Google now indexes Flash content</h3>
<p>From the <a href="http://googleblog.blogspot.com/2008/06/google-learns-to-crawl-flash.html">horse&#8217;s mouth</a>:</p>
<blockquote><p>All of the text that users can see as they interact with your Flash file. If your website contains Flash, the textual content in your Flash files can be used when Google generates a snippet for your website. Also, the words that appear in your Flash files can be used to match query terms in Google searches.</p></blockquote>
<p>One less excuse to avoid Flash now when customers want it. At least we still have &#8220;accessibility&#8221;.</p>
<p>&nbsp;</p>
<h3>Ian Whitmore</h3>
<p>A friend of mine recently recieved his MFA from UI-Bloomington and he sent me a link to another UI alumni, photographer <a href="http://www.ianwhitmore.com/">Ian Whitmore</a>. The &#8220;Channels&#8221; series is particularly cool. An interesting take on portraiture. </p>
<p>&nbsp;</p>
<h3>Interview</h3>
<p>I was interviewed again this week. This time by Webia, the &#8220;Web International Awards&#8221;. There is no direct link to it, but <a href="http://www.webia.info/viewarticles.php?cat=3&#038;page=1">this page</a> should have it and then you can see the whole thing with the &#8220;full story&#8221; link.</p>
<p>&nbsp;</p>
<h3>Weekend Issues</h3>
<p>Thanks to everyone who emailed last Friday about the downtime. My MySQL container on Media Temple was kaput and needed a manual restart. Was down for a quite a few hours there, so sorry about that. Then I thought I would get smart and start using WP Super Cache. This is the third time now I&#8217;ve tried to use a caching plugin, and it&#8217;s the third time now that it has completed wrecked my RSS feed. I tried doing everything suggested in <a href="http://wordpress.org/support/topic/166793">this thread</a>, still no dice. I think it&#8217;s basically caching my feed even though I&#8217;m telling it not to, which then serves up my feed as a web page and not an XML document which obviously feed readers can&#8217;t handle.
<p><a href="http://www.cakemail.com"><img src="http://css-tricks.com/images/CakeMail-468x60_1.gif" alt="Email Marketing Software" /></a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/CssTricks?a=uaOeOJ"><img src="http://feeds.feedburner.com/~f/CssTricks?i=uaOeOJ" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/CssTricks?a=6nZ2Qj"><img src="http://feeds.feedburner.com/~f/CssTricks?i=6nZ2Qj" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/CssTricks?a=yJY2aj"><img src="http://feeds.feedburner.com/~f/CssTricks?i=yJY2aj" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/CssTricks/~4/329784237" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://css-tricks.com/links-of-interest-38/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=CssTricks&amp;itemurl=http%3A%2F%2Fcss-tricks.com%2Flinks-of-interest-38%2F</feedburner:awareness><feedburner:origLink>http://css-tricks.com/links-of-interest-38/</feedburner:origLink></item>
		<item>
		<title>New Poll: What is your favorite CMS?</title>
		<link>http://feeds.feedburner.com/~r/CssTricks/~3/329046523/</link>
		<comments>http://css-tricks.com/new-poll-what-is-your-favorite-cms/#comments</comments>
		<pubDate>Mon, 07 Jul 2008 17:30:35 +0000</pubDate>
		<dc:creator>Chris Coyier</dc:creator>
		
		<category><![CDATA[Quick Tip / Trick]]></category>

		<guid isPermaLink="false">http://css-tricks.com/?p=815</guid>
		<description><![CDATA[
There is a new poll in the sidebar folks. This one is about Content Management Systems (CMS). There was a pretty good comment thread going a little while ago which sparked the idea for this poll. 
I&#8217;ve always been a WordPress guy, and now with the ability to easily create different page templates for different [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://css-tricks.com/wp-content/csstricks-uploads/cms-header.jpg" width="570" height="210" alt="" title="" /></p>
<p>There is a new poll in the sidebar folks. This one is about Content Management Systems (CMS). There was a <a href="http://css-tricks.com/interesting-reader-questions/">pretty good comment thread</a> going a little while ago which sparked the idea for this poll. </p>
<p>I&#8217;ve always been a WordPress guy, and now with the ability to easily create different page templates for different page styles, I feel like it really has evolved into a &#8220;real&#8221; CMS instead of just a blogging platform. However, I am extremely curious and interested in other CMSs and what they have to offer. To me, it seems like Drupal or Joomla would be a smarter route to take if you were creating a site that was segmented into different major areas, each with kind of a life of it&#8217;s own. For example, DZone has sub-sites like <a href="http://java.dzone.com/">Javalobby</a> and <a href="http://eclipse.dzone.com/">Eclipse Zone</a>. Each of these have different leaders, different RSS feeds, different looks&#8230; I think that would be hard to do with WordPress, much easier with Drupal.  Am I right?</p>
<p>Cast your vote in the sidebar and let&#8217;s see which CMS reins supreme favorite amongst CSS-Tricks readers. Remember you can view and participate in past polls on the <a href="http://css-tricks.com/polls/">Polls page</a>.
<p><a href="http://bandwebsitetemplate.com">Band Website Template</a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/CssTricks?a=qPH0OJ"><img src="http://feeds.feedburner.com/~f/CssTricks?i=qPH0OJ" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/CssTricks?a=pkMJkj"><img src="http://feeds.feedburner.com/~f/CssTricks?i=pkMJkj" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/CssTricks?a=tXoyNj"><img src="http://feeds.feedburner.com/~f/CssTricks?i=tXoyNj" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/CssTricks/~4/329046523" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://css-tricks.com/new-poll-what-is-your-favorite-cms/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=CssTricks&amp;itemurl=http%3A%2F%2Fcss-tricks.com%2Fnew-poll-what-is-your-favorite-cms%2F</feedburner:awareness><feedburner:origLink>http://css-tricks.com/new-poll-what-is-your-favorite-cms/</feedburner:origLink></item>
	<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetFeedData?uri=CssTricks</feedburner:awareness></channel>
</rss>
