<?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>Noupe Design Blog &#187; CSS</title>
	<atom:link href="http://www.noupe.com/css/feed" rel="self" type="application/rss+xml" />
	<link>http://www.noupe.com</link>
	<description>Web Designer&#039;s Online Resource</description>
	<lastBuildDate>Thu, 02 Sep 2010 14:31:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>15 CSS Habits to Develop for Frustration-Free Coding</title>
		<link>http://www.noupe.com/css/15-css-habits-to-develop-for-frustration-free-coding.html</link>
		<comments>http://www.noupe.com/css/15-css-habits-to-develop-for-frustration-free-coding.html#comments</comments>
		<pubDate>Mon, 19 Apr 2010 14:44:43 +0000</pubDate>
		<dc:creator>vitaly</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.noupe.com/?p=41094</guid>
		<description><![CDATA[<table width="650"><tr><td width="650"><div style="width:650px;">
      <img src="http://statisches.auslieferung.commindo-media-ressourcen.de/advertisement.gif" alt="" border="0" /><br />
      <a href="http://auslieferung.commindo-media-ressourcen.de/www/delivery/ck.php?zoneid=8" target="_blank"><img src="http://auslieferung.commindo-media-ressourcen.de/www/delivery/avw.php?zoneid=8" border="0" alt="" /></a>&nbsp;<a href="http://auslieferung.commindo-media-ressourcen.de/www/delivery/ck.php?zoneid=9" target="_blank"><img src="http://auslieferung.commindo-media-ressourcen.de/www/delivery/avw.php?zoneid=9" border="0" alt="" /></a>&nbsp;<a href="http://auslieferung.commindo-media-ressourcen.de/www/delivery/ck.php?zoneid=10" target="_blank"><img src="http://auslieferung.commindo-media-ressourcen.de/www/delivery/avw.php?zoneid=10" border="0" alt="" /></a>
    </div></td></tr></table>
&nbsp;&nbsp; By Jeremy Davis It’s been said that the key to a civilization&#8217;s success is mastery of the food system. Unless a group of people can effectively control the basic needs for survival, they will never achieve greatness. Likewise, before CSS skills can be expanded to an advanced level, the basics must become instinct to [...]]]></description>
			<content:encoded><![CDATA[<table width="650">
<tr>
<td width="650">
<div style="width:650px;">
      <img src="http://statisches.auslieferung.commindo-media-ressourcen.de/advertisement.gif" alt="Advertisement in " border="0" /><br />
      <a href="http://auslieferung.commindo-media-ressourcen.de/www/delivery/ck.php?zoneid=8" target="_blank"><img src="http://auslieferung.commindo-media-ressourcen.de/www/delivery/avw.php?zoneid=8" border="0" alt=" in "  /></a>&nbsp;<a href="http://auslieferung.commindo-media-ressourcen.de/www/delivery/ck.php?zoneid=9" target="_blank"><img src="http://auslieferung.commindo-media-ressourcen.de/www/delivery/avw.php?zoneid=9" border="0" alt=" in "  /></a>&nbsp;<a href="http://auslieferung.commindo-media-ressourcen.de/www/delivery/ck.php?zoneid=10" target="_blank"><img src="http://auslieferung.commindo-media-ressourcen.de/www/delivery/avw.php?zoneid=10" border="0" alt=" in "  /></a>
    </div>
</td>
</tr>
</table>
<p><em>By Jeremy Davis</em></p>
<p>It’s been said that the key to a civilization&#8217;s success is mastery of the food system. Unless a group of people can effectively control the basic needs for survival, they will never achieve greatness. Likewise, before CSS skills can be expanded to an advanced level, the basics must become instinct to any CSS coder. Develop these habits and you lay a solid foundation to apply advanced <strong>CSS techniques</strong>.</p>
<p><span id="more-41094"></span></p>
<h3>1. Use a Reset Stylesheet</h3>
<p>This habit (along with a few others) is one frequently mentioned as a CSS best practice. The goal of a reset stylesheet is to <strong>reduce inconsistencies</strong> among browsers by explicitly setting styles to most of the HTML elements. This ensures that things like font sizes and line heights all render the same on different browsers. Also, the reset clears the default paddings/margins that some browsers have.
</p>
<p>Not only does having a reset stylesheet account for browser inconsistencies, it&#8217;s good to use them to give each site a known foundation when coding. Keeping the foundation the same for all sites will <strong>speed along</strong> the development.</p>
<p>The <a href="http://meyerweb.com/eric/tools/css/reset/index.html">reset from Eric Meyer</a> and the <a href="http://developer.yahoo.com/yui/reset/">Yahoo reset</a> are the most comment resets used. Futher customizing one of those resets might be needed to accomodate for specific website needs.</p>
<h3>2. Use CSS Shorthand</h3>
<p>Using shorthand CSS declarations will lead to <strong>quicker coding and debugging.</strong> It might also save some errors from mistyping multiple declarations.</p>
<p>When a rule has multiple similiar declarations for a single selector, such as </p>
<pre class="brush: css">
border-top: 5px;
border-right: 10px;
border-bottom: 15px;
border-left: 20px;
</pre>
<p>they can be combined into one line, such as</p>
<pre class="brush: css">border: 5px 10px 15px 20px;</pre>
<p>The trick to remember which position controls which direction is TRouBLe: Top, Right, Bottom, Left.</p>
<p>The main declarations that use shorthand for are <code>border</code>, <code>margin</code>, <code>padding</code> and <code>background</code>.</p>
<h4>Bonus: Hex Shortcut</h4>
<p>Six hexidecimal digits used for CSS colors can be condensed down to three if they are grouped in identical pairs.
</p>
<p>For example, <code>#FFFFFF</code> can be written <code>#FFF</code>, or <code>#990055</code> can be written <code>#905</code>, but <code>#F091A4</code> cannot be shortened since the pairs aren’t identical.</p>
<h3>3. Document Your CSS … As You Go</h3>
<p>Going back and commenting code is one of those quixotic things that most fool themselves into thinking they will do. Get in the habit of making good commenting practices while writing styles.</p>
<p>To add a comment in CSS it’s as simple as putting <code>/* <em>Your Comment Here */</em></code></p>
<h4>Things to comment</h4>
<p><strong>Stylesheet Header</strong><br />This comment briefly states what the stylesheet is for, who wrote it and when. A table of contents might also be needed for larger stylesheets.</p>
<p><strong>Code sections</strong><br />Put a comment header above large portions of code for things like global styles, headers, sidebars, main content and footer to help delineate them.</p>
<p>For example,</p>
<pre class="brush: css">
/****************************************/
/*             Sidebar                  */
/****************************************/
</pre>
<p><strong>Problem declarations</strong><br />Put comments next to declarations that have know issues in certain browsers, such as</p>
<pre class="brush: css">input[type=textbox] /* IE6 Problem */ </pre>
<p><strong>Dependent declarations</strong><br />Put comments next to things that are dependant on other areas. So if there is a fixed height on a declaration that might need to be adjusted if the content changes, put a small comment next to it, stating what conditions must happen before it will need to adjust.</p>
<h3>4. Add a Color Legend</h3>
<p>When working on smaller CSS files, keeping track of color hex values isn&#8217;t too hard. But as stylesheets start getting 2000+ lines it becomes significantly harder to keep track of which value is for which color. Adding a color legend helps ensure that the <strong>wrong colors don&#8217;t get used.</strong></p>
<p>The best place for the legend is up in the stylesheet header, underneath all of the other documention.</p>
</p>
<p>For example,</p>
<pre class="brush: css">
/*
/* light blue: #4595be
/* dark blue: #367595
/* special link red: #9F1212
********************************/
</pre>
<h3>5. Remember Where Absolutely Positioned Elements are Relative To</h3>
<p>Positioning elements absolutely is something that tends to frighten some CSS beginners, but there is <strong>one principle</strong> to remember with this declaration that solves most of the trouble.</p>
<p>When a selector has a <code>postition: absolute</code> declaration the webpage is treated like a xy grid. By default, the 0,0 position of the grid is at the very top and left position on the webpage. So by moving the absolutely positioned element to the left 10 pixels and from the top 20 pixels, it’s starting from the top left of the webpage, regardless of where the element sits in the HTML.</p>
<p>That is not usually the desired functionality. What usually is desired is to have the element positioned <strong>relative </strong> to the selector&#8217;s parent or another containing element. To do that simply add <code>position: relative</code> to the desired relative container element. Doing that remaps the 0,0 position on the xy grid from the top of the webpage to the top left of the containing element.</p>
<p>The example below demonstrates how the red box gets positioned differenlty depending on whether the blue container has <code>position: relative</code> or not.</p>
<p class="showcase">
<img src="http://www.noupe.com/wp-content/uploads/2010/04/position.png" alt="Position in " />
</p>
<p>Remembering <code>position: relative</code> should ease most frustrations caused by basic absolute positioning.</p>
<h3>6. Avoid Using CSS Hacks</h3>
<p>Unfortunately for web designers, there are bugs in some browsers, mainly IE6 and IE7, that cause some styles not to display as they are supposed to in accordance with CSS specifications. In order to combate these inconsistencies, some people write erroneous declarations, hacks, that take advantage of these browser flaws in order to do things, such as hide styles from particular browsers</p>
<p>There are many fancifully named hacks for all the equally fancifully named CSS bugs, but using them can cause problems. Not only do hacks clutter the stylesheet with oddball declarations, it also keeps the stylesheet from validating.</p>
<p>Also, hacks tend to <strong>introduce more problems</strong> overtime as new browsers are released.</p>
<p>Instead, use <a href="http://css-tricks.com/how-to-create-an-ie-only-stylesheet/">conditional stylesheets</a> to target specific browsers.</p>
<h3>7. Use Margins When Styling Layouts</h3>
<p>Although this habit isn’t one often mentioned, it&#8217;s one that helps <strong>maintain a consistent layout</strong> among different browsers without having to add more declarations to get them all in sync.</p>
<p>The main idea is that instead of adding <strong>padding to a container</strong> element, <strong>add margin to the container’s children</strong> to get the same result.</p>
<p>So, instead of </p>
<pre class="brush: css">#main-content { padding-left: 10px }</pre>
<p>add</p>
<pre class="brush: css">
#main-content { }
#main-content #left-column { margin-left: 10px }
</pre>
<p>Although there is nothing particularly wrong with using padding, in my years of building websites I have had consistenly fewer cross-browser problems when I stick with styling layouts with margin.</p>
<h3>8. Contain Floats</h3>
<p>When floating an element, add <code>overflow: hidden</code> to its containing element.</p>
<p>A common example is,</p>
<pre class="brush: css">
ul {
	overflow: hidden;
}

ul li {
	float: left;
}
</pre>
</p>
<p>If the container didn&#8217;t have <code>overflow:hidden</code> issues arise when setting margins or borders to it. This also clears the float so that elements below it can flow properly in the HTML structure.</p>
<p>
Some suggest doing the clear in HTML by adding</p>
<p><code> &lt;div style="clear:both"&gt;&lt;/div&gt; </code></p>
<p>below the floated element, but doing that defeats the purpose of separating a webpage&#8217;s style and structure.
</p>
<p>It&#8217;s also more time consuming than adding <code>overflow: hidden</code>.
</p>
<h3>9. Add display: inline To Floated Elements</h3>
<p>This habit is one that fixes a IE6 problem called the double-margin bug without having to use a CSS hack. On floated elements, IE6 doubles the margin of the element. So a margin of 10px becomes 20px.</p>
<p>It&#8217;s easy to imagine the havoc an error like this can cause to a layout. Some of the floated items either become hidden or they push everything below it down.</p>
<p>Even though IE6 is on its way out and a majority of designers aren&#8217;t taking the time to get sites looking perfect in IE6, this is a quick habit to learn to make a site better viewed for those poor people still on IE6.</p>
<p>Just get in the habit of adding</p>
<pre class="brush: css">display: inline /* IE6 Problem */</pre>
<p>every time something is floated.</p>
<h3>10. Get Comfortable with Sprites</h3>
<p>Sprites <strong>mask the viewable space of a larger image</strong>, then when an event occurs, typically a <code>:hover</code> event, the viewable space of the image changes to show another portion of the image.</p>
<p>Not only are sprites more efficient by requiring fewer HTTP calls for images, but they <strong>add more polish</strong> to website designs. Most often sprites are used to <a href="http://www.webdesignerwall.com/tutorials/advanced-css-menu/">create stylish navigation menus.</a></p>
<p>Using sprites in a design might take a bit of trial and error to get the hang of it, but it&#8217;s such a valuable skill to have that it&#8217;s worth the effort required to get the concept down</p>
<h4>Further Reading</h4>
<ul>
<li><a href="http://www.smashingmagazine.com/2009/04/27/the-mystery-of-css-sprites-techniques-tools-and-tutorials/">The Mystery of CSS Sprites: Techniques, Tools and Tutorials</a></li>
</ul>
<h3>11. Have a Consistent File Structure</h3>
<p>Take the time to create and organize all of the typical files used for a typcial website development project. Create one master template file structure and copy/paste it every time a website needs to be built. </p>
<p>My organization is as follows:</p>
<p class="showcase"><img src="http://www.noupe.com/wp-content/uploads/2010/04/file-structure.png" alt="File-structure in " /></p>
<p>The &#8216;Website Name&#8217; folder gets renamed to the website name that I&#8217;m about to begin work on. That folder contains all of my HTML files for the site, along with the &#8216;assets&#8217; and &#8216;styles&#8217; folders.</p>
<p>The &#8216;assets&#8217; folder typically holds larger document files like PDFs that might need to be downloaded from the site. I also keep editible versions of images I&#8217;m using, such as PSDs or Fireworks PNGs, in case I need to modify something.
</p>
<p>The &#8216;styles&#8217; folder is broken into the three subfolders: css, images, javascript.</p>
<ul>
<li>css &#8211; holds all the css files, such as reset.css, layout.css and main.css</li>
<li>images &#8211; holds all the images for the site</li>
<li>javascript &#8211; holds javascript libraries, plugins and main.js</li>
</ul>
<p>I use this file structure for most of my webpages and because I’m consistent I know exactly what paths to use when needing to do things, such as put a background image in my CSS.</p>
<p>Some might disagree with my structure, such as having javascript under &#8216;styles&#8217;, but the main point is find a file organization that works for you and get in the habit of consistently using it to <strong>make coding faster and more accurate</strong>.</p>
<h3>12. Indent Your Styles</h3>
<p>Adding indentation to a stylesheet can keep complicated stylesheets looking clean and make finding areas of code easier. Add indents to <strong>show a parent/child hierarchy.</strong></p>
<p class="showcase"<br />
	<img src="http://www.noupe.com/wp-content/uploads/2010/04/indent-stylesheet.png" alt="Indent-stylesheet in " /><br />
<h3>13. Use Pixels for Font Sizes, Not Ems</h3>
<p>This habit is usually a hot button topic with most people having a strong opinion for either fixed font sizes or relative ones.
</p>
<p>In hopes to curtail a probably backlack, let me plainly state, &#8220;Using a fixed font size, like pixels, <strong>leads to fewer CSS frustrations</strong> than using a relative font size, such as ems or %.&#8221;
</p>
<p>In his article <a href="http://cameronmoll.com/archives/2009/06/coding_like_its_1999/">Coding Like It&#8217;s 1999</a>, Cameron Moll petitions for pixels and says, </p>
<blockquote><p>The burden of calculating relative units throughout a CSS document is replaced by the convenience of absolute units</p></blockquote>
<p>Relative font sizes were a good idea a few years ago so that people with different browser font sizes could have a site&#8217;s content adjust to their browser’s font size. But now most browsers can zoom and adjust more intelligently so a relative measurement isn’t neeed for that purpose anymore.</p>
<p>Relative measurement becomes a problem because the font sizes inherit the parent&#8217;s measurement as it cascades down.</p>
<p>For example, <code>body { font-size: 62.5% }</code> makes a <code>font-size: 1em</code> declaration equal to 10px.</p>
<p>If <code>#blog-content</code> needs to be 14px, the rule is
</p>
<pre class="brush: css">#blog-content { font-size: 1.4em; }</pre>
<p>Now the if the H3 tag inside of <code>#blog-content</code> needs to be 20 pixels, one might assume
</p>
<pre class="brush: css">
#blog-content { font-size: 1.4em; }
#blog-content h3 { font-size: 2.0em }
</pre>
<p>would be right, but that&#8217;s where the relativity problem occurs. Because that 2.0em is now <strong>relative</strong> to the 1.4em specified on <code>#blog-content</code>, so it is actually font size of 28px.</p>
<p>Keeping up with relative font sizing can get confusing. <strong>Stick to using a fixed unit of measure</strong> for font sizes to prevent undue troubles.</p>
<h3>14. Limit Pseudo Classes to Anchor Tags</h3>
<p>Most modern browsers don&#8217;t struggle with this problem, but it is an important one to remember if a website still needs to be viewable on older browsers, such as IE6.
</p>
<p>The problem is that older browsers only recognize pseduo classes, like <code>:hover</code>, on the anchor tag element, <code>a</code>.</p>
<p>So something like</p>
<pre class="brush: css">
#header ul li:hover { background-color: #900 }
</pre>
<p>
won&#8217;t work in IE6.
</p>
<p>This issue could cause real functionality problems, if things like dropdown menus are to appear based on the li:hover event. People viewing the site on IE6 would never see the dropdown and thus, might have a hard time navigating the site.</p>
<p>A solution is to use <a href="http://www.jquery.com">jQuery</a> for those types of effects.</p>
<h3>15. Avoid Selector Issues</h3>
<h4>Be sure selectors have enough weight to prevent unwanted cascades.</h4>
<p>The way the browser determines what style is to be applied to an element with multiple declarations is determined by its <a href="http://www.smashingmagazine.com/2007/07/27/css-specificity-things-you-should-know/">specificity</a>
</p>
<p>The more specified a CSS selector is the more <em>weight</em> that rule carries. The rule with the heaviest weight is the one that gets applied to the element</p>
<p>If some rules are being applied as desired, check to see if the problem is with its specificity. It might be as simple of a solution as adding an <code>#id-name</code> to the beginning of the selector.
</p>
<h4>Use element selectors when possible.</h4>
<p>Instead of </p>
<pre class="brush: css">main-content .main-header</pre>
<p>use</p>
<pre class="brush: css">#main-content h1</pre>
<h4>Be careful when grouping selectors.</h4>
<p>Grouping selectors can be a time-saving method when dealing with non-relative declarations, like </p>
<pre class="brush: css">
.main-content div, .main-content p {
	color: #000;
}
</pre>
</p>
<p>But it can cause trouble when using a relative declaration, such as</p>
<pre class="brush: css">
.main-content div, .main-content p {
	line-height: 1.3em;
}
</pre>
</p>
<p>Because now all of the text within the div gets a 1.3em line-height applied to it, but now any <em>p</em> elements within a <em>div</em> get an additional 1.3em added to them.
</p>
<p>Also, sometimes grouping multiple selectors can add more weight to them than is desired, which in turns causes other <strong>desired styles not to take place</strong>.</p>
<h3>* Write Better HTML</h3>
<p>Bonus Tip! A great way to become a better CSS coder is to <strong>improve your HTML coding</strong>.</p>
<p><strong>Avoid div-itis</strong> by wrapping divs around everything. Learn to style the elements with element selectors, such as <code>h1</code>, <code>ul</code> and <code>p</code>.</p>
<p>Use a proper <a href="http://www.alistapart.com/articles/doctype/">DOCTYPE</a> to avoid sending browsers into quirks mode.</p>
<p>Try to code as much HTML as possible before adding any styles. Doing this brings more thought to the overall structure of the webpage and causes syntax problems to be spotted and fixed instead of covering them up with styles.</p>
<h3>Further Resources</h3>
<p>Here are some articles that further explain some of the basics CSS principles mentioned here.</p>
<ul>
<li>
		<a href="http://www.smashingmagazine.com/2008/08/18/7-principles-of-clean-and-optimized-css-code/">7 Principles of Clean and Optimized CSS Code</a>
	</li>
<li>
		<a href="http://www.smashingmagazine.com/2009/04/27/the-mystery-of-css-sprites-techniques-tools-and-tutorials/">The Mystery of CSS Sprites: Techniques, Tools and Tutorials</a>
	</li>
<li>
		<a href="http://www.smashingmagazine.com/2009/10/05/mastering-css-coding-getting-started/">Mastering CSS Coding: Getting Started</a>
	</li>
<li>
		<a href="http://www.smashingmagazine.com/2008/02/21/powerful-css-techniques-for-effective-coding/">Powerful CSS Techniques for Effective Coding</a>
	</li>
<li>
		<a href="http://www.smashingmagazine.com/2007/01/19/53-css-techniques-you-couldnt-live-without/">53 CSS Techniques You Couldn&#8217;t Live Without</a>
	</li>
</ul>
<p></p>
<h4>About the author</h4>
<p><em><br />
	Jeremy Davis is a recent college graduate working as a designer and front-end developer for a public school system. He (in)frequently blogs about web design, web development and technology on his <a href="http://www.jeremyadamdavis.com">personal blog</a>. He is also *currently accepting more <a href="http://www.twitter.com/jeremydavis">Twitter</a> followers.<br />
</em></p>
<p>*offer ends soon, act fast.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.noupe.com/css/15-css-habits-to-develop-for-frustration-free-coding.html/feed</wfw:commentRss>
		<slash:comments>109</slash:comments>
		</item>
		<item>
		<title>CSS Techniques I Wish I Knew When I Started Designing Websites</title>
		<link>http://www.noupe.com/css/css-techniques-i-wish-i-knew-when-i-started-designing-websites.html</link>
		<comments>http://www.noupe.com/css/css-techniques-i-wish-i-knew-when-i-started-designing-websites.html#comments</comments>
		<pubDate>Fri, 18 Dec 2009 14:37:20 +0000</pubDate>
		<dc:creator>vitaly</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.noupe.com/?p=34088</guid>
		<description><![CDATA[<table width="650"><tr><td width="650"><div style="width:650px;">
      <img src="http://statisches.auslieferung.commindo-media-ressourcen.de/advertisement.gif" alt="" border="0" /><br />
      <a href="http://auslieferung.commindo-media-ressourcen.de/www/delivery/ck.php?zoneid=8" target="_blank"><img src="http://auslieferung.commindo-media-ressourcen.de/www/delivery/avw.php?zoneid=8" border="0" alt="" /></a>&nbsp;<a href="http://auslieferung.commindo-media-ressourcen.de/www/delivery/ck.php?zoneid=9" target="_blank"><img src="http://auslieferung.commindo-media-ressourcen.de/www/delivery/avw.php?zoneid=9" border="0" alt="" /></a>&nbsp;<a href="http://auslieferung.commindo-media-ressourcen.de/www/delivery/ck.php?zoneid=10" target="_blank"><img src="http://auslieferung.commindo-media-ressourcen.de/www/delivery/avw.php?zoneid=10" border="0" alt="" /></a>
    </div></td></tr></table>
&nbsp;&nbsp; By Tim Wright and TJ Kelly CSS is the best thing to happen to the web since Tim Berners-Lee. It&#8217;s simple, powerful, and easy to use. But even with all its simplicity, it hides some important capabilities. Ask any designer, and they&#8217;ll tell you that the majority of their code headaches are caused and [...]]]></description>
			<content:encoded><![CDATA[<table width="650">
<tr>
<td width="650">
<div style="width:650px;">
      <img src="http://statisches.auslieferung.commindo-media-ressourcen.de/advertisement.gif" alt="Advertisement in " border="0" /><br />
      <a href="http://auslieferung.commindo-media-ressourcen.de/www/delivery/ck.php?zoneid=8" target="_blank"><img src="http://auslieferung.commindo-media-ressourcen.de/www/delivery/avw.php?zoneid=8" border="0" alt=" in "  /></a>&nbsp;<a href="http://auslieferung.commindo-media-ressourcen.de/www/delivery/ck.php?zoneid=9" target="_blank"><img src="http://auslieferung.commindo-media-ressourcen.de/www/delivery/avw.php?zoneid=9" border="0" alt=" in "  /></a>&nbsp;<a href="http://auslieferung.commindo-media-ressourcen.de/www/delivery/ck.php?zoneid=10" target="_blank"><img src="http://auslieferung.commindo-media-ressourcen.de/www/delivery/avw.php?zoneid=10" border="0" alt=" in "  /></a>
    </div>
</td>
</tr>
</table>
<p><em>By Tim Wright and TJ Kelly</em></p>
<p><strong>CSS</strong> is the best thing to happen to the web since Tim Berners-Lee. It&#8217;s simple, powerful, and easy to use. But even with all its simplicity, it hides some important capabilities. Ask any designer, and they&#8217;ll tell you that the majority of their code headaches are caused and ultimately solved by CSS. </p>
<p>All designers at some point in their career go through the process of encountering a weird display issue, searching for a resolution, and discovering a trick, technique, or hack could have saved them hours of frustration&#8212;<em>if they had only known when they started.</em> </p>
<p>We&#8217;ve put together a list of the most frustrating and time-consuming CSS headaches and, more importantly, their solutions (along with examples and further resources). I hope this list will help you save some gray hairs. As for me, I think I feel some coming in right now&#8230;</p>
<p><span id="more-34088"></span></p>
<h3>Resets &amp; Browser Inconsistencies</h3>
<p>Not all browsers are created equal. In fact, every browser is different. What is the default margin, padding, or font-size of a <code>&lt;p&gt;</code> element? You might be surprised at the wide range of values. To handle the differences between browsers, many of us want to level the playing field and start from scratch, by using <strong>CSS reset styles</strong>. </p>
<p>The early stages of resets, designers dealt with differing margin and padding values, using a global reset:</p>
<p>	<code>* { margin: 0; padding: 0; }</code></p>
<p>But, as more people used and discussed resets, it became clear that resetting only margin &amp; padding wasn&#8217;t enough (and, applying the above rule to <strong>every element</strong> is taxing on the rendering engine). Thanks to <a href="http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/">the work of Eric Meyer</a> and other CSS pioneers, a better, more complete collection of reset rules was created: </p>
<pre>
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
	margin: 0;
	padding: 0;
	border: 0;
	outline: 0;
	font-weight: inherit;
	font-style: inherit;
	font-size: 100%;
	font-family: inherit;
	vertical-align: baseline;
	}
/* remember to define focus styles! */
:focus {
	outline: 0;
	}
body {
	line-height: 1;
	color: black;
	background: white;
	}
ol, ul {
	list-style: none;
	}
/* tables still need 'cellspacing="0"' in the markup */
table {
	border-collapse: separate;
	border-spacing: 0;
	}
caption, th, td {
	text-align: left;
	font-weight: normal;
	}
blockquote:before, blockquote:after,
q:before, q:after {
	content: "";
	}
blockquote, q {
	quotes: "" "";
	}
</pre>
<p>As important as it is to note which elements are included in the most popular CSS reset available today .It&#8217;s also important to note some of the elements that are deliberately excluded from this list:</p>
<ul>
<li>input</li>
<li>button</li>
<li>hr</li>
</ul>
<p>These elements were excluded because their cross-browser differences are so vast that you would have to completely unstyle them to create a &quot;bulletproof&quot; element. They&#8217;re so weird, that even then, there&#8217;s no guarantee.</p>
<h4>Resources for Resets</h4>
<ul>
<li><a href="http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/">Eric Meyer&#8217;s Resets</a> and the <a href="http://meyerweb.com/eric/thoughts/2007/04/18/reset-reasoning/">reasoning behind them</a></li>
<li><a href="http://www.smashingmagazine.com/2007/09/21/css-frameworks-css-reset-design-from-scratch/">Smashing article: &ldquo;Design from Scratch&rdquo;</a></li>
<li><a href="http://code.google.com/p/blueprintcss/">Google BluePrint CSS &amp; Resets</a></li>
<li><a href="http://developer.yahoo.com/yui/reset/">Yahoo YUI CSS Resets</a></li>
</ul>
<h3>Box Model &#8212; Margin, Padding &amp; Borders</h3>
<p>The box model is the basis for all layouts. It governs the dimensions &amp; spacing of the elements on a page. To understand it, we have to understand the difference between <strong>block-level</strong> elements and <strong>inline</strong> elements. </p>
<p><strong>Block-level</strong> elements, by default, take up the entire width of their containing element and the height of the default <em>line-height</em>. They will stack up underneath each other, top-to-bottom. Therefore, by default, they will take up their own line on a page. Some block-level elements are: <code>&lt;div&gt;</code>, <code>&lt;pre&gt;</code>, <code>&lt;p&gt;</code>, <code>&lt;ul&gt;</code>, <code>&lt;ol&gt;</code>, <code>&lt;li&gt;</code>, etc.</p>
<p><strong>Inline</strong> elements are, just as their name implies, in-line. They will stack up next to each other, left-to-right. When given content, they will take up the exact width and height of that content. Given no content, they will collapse down and have no width or height. Some in-line elements are: <code>&lt;img&gt;</code>, <code>&lt;em&gt;</code>, <code>&lt;strong&gt;</code>, <code>&lt;a&gt;</code>, <code>&lt;span&gt;</code>, etc.</p>
<p>All HTML <em>block-level elements</em> have five spacing properties: <strong>height</strong>, <strong>width</strong>, <strong>margin</strong>, <strong>padding</strong>, and <strong>border</strong> (inline elements have them too, they just work a bit differently). Width and height are tricky attributes, as they require a bit of calculation. When measuring an element&#8217;s width, designers must consider <strong>the entire box</strong>. </p>
<p>In the example below, the box has a total width of 260px. The margin, padding, and border are 30px each (remember, that&#8217;s 30px on top, 30 on bottom, 30 right, and 30 left). So, in this example, the margin takes up 60 pixels of the box&#8217;s width. Likewise, the border and padding consume 60px each. All together, the margin, border, and padding amount to  180 pixels of the box&#8217;s total width. </p>
<p><img src="http://www.noupe.com/wp-content/uploads/2009/12/box-model.png" alt="Box-model in " width="260" height="260" /></p>
<p>We know that the box&#8217;s total width is 260px, but in CSS the <code>width</code> attribute refers to the <strong>content area</strong> on the inside of the box. So, for this example, we have to subtract 180 pixels (for margin, border, and padding) from 260 (total box width), leaving us with a content area of 80px. Therefore, our CSS looks like this: </p>
<pre>
div {
  margin:30px;
  border:30px solid yellow;
  padding:30px;
  width:80px;
  height:80px;
}
</pre>
<h4>Extras</h4>
<ol>
<li>All of the examples and rules we&#8217;re discussed for the <code>width</code> property also apply to <code>height</code>.
		</li>
<li><code>margin</code> can support <strong>negative</strong> values. Use them cautiously but they can prove to be very strong design elements.</li>
<li>Don&#8217;t forget the <strong>units</strong> with the box model. Only a zero-value (margin:0;) can be written without a unit specified.</li>
</ol>
<h4>Resources for CSS Box Model</h4>
<ul>
<li><a href="http://www.w3.org/TR/CSS2/box.html">W3C CSS Specifications</a></li>
<li><a href="http://www.yourhtmlsource.com/stylesheets/cssspacing.html">HTMLsource Box Model tutorial</a> by Ross Shannon</li>
<li><a href="http://webdesignernotebook.com/css/guide-to-margins-and-paddings/">&ldquo;Beginner’s Guide to Margins and Paddings&rdquo;</a> at Web Designer Notebook</li>
</ul>
<h3>Dimensions &#8212; Width, Height, Min &amp; Max</h3>
<p>Now that we understand how to use width and height in unison with the box model, let&#8217;s look at some of the flexibility of CSS dimensions. Modern browsers support min- and max-width (and the same for height), allowing us to get creative with dimensions and create flexible layouts. </p>
<p><strong>Width/height</strong> specify the space an object should occupy. They can be measured in pixels (10px), ems (10em) and percentages (10%), as well as <a href="http://htmlhelp.com/reference/css/units.html">a few other units</a>. Defining a width or height for an element will force that element to keep those dimensions, regardless of the content inside it. So, if our content is too big for its container, it will be cut off, hiding the bottom of our content (or just look really messed up). </p>
<h4>Min-width &amp; min-height</h4>
<p>Giving an element a min-width or min-height will set the element to our exact dimension by default. But, since we only provided a minimum dimension, as the content grows, the containing element will allowed to stretch and all of our content will remain visible. </p>
<p>Min-width &amp; min-height can he useful for form elements like <code>&lt;input /&gt;</code> and <code>&lt;textarea&gt;</code>. We can define them with a minimum width/height and let them expand as the user types.</p>
<p>In IE6, &quot;height&quot; acts the same way &quot;min-height&quot; does in modern browsers as a container will grow with content (something to be aware of when using building for IE6).</p>
<h4>Max-width &amp; max-height</h4>
<p>If we give an element a max-width or max-height, it will collapse down to the size of our content by default. As our content grows, the container will stretch&#8212;until it reaches our maximum. Then our remaining content will be cut off or look really weird hanging of the bottom of a content block.</p>
<p>Max-width &amp; max-height can be useful for browsing long lists (if you correctly manage your <strong>overflow</strong> &#8211; create scrolling if the list goes too long).</p>
<h4>Using Max &amp; Min width in IE6</h4>
<p><strong>Min &amp; Max width</strong> are both great tools to have in your design arsenal, but unfortunately they don&#8217;t work in IE6, so what do we do? We usually lock down the width of our site instead of creating the ideal fluid layout we want,  sacrificing user experience for out of date browsers.</p>
<p>Luckily, we can use a short <strong>JavaScript command targetting IE</strong> to accomplish a nice fluid layout with max &amp; min widths in IE6:</p>
<pre><code>#page-wrap{
min-width:800px;
max-width:1000px;
width:expression(document.body.clientWidth < 800? "800px" : document.body.clientWidth > 1000? "1000px" : "auto");
}</code></pre>
<p>In the above example, you can see that the smallest width for this page is 800px, and the largest is 1000px; not much of a flex, but the concept can be applied to any element.</p>
<p>And if you only wanted to use min-width:</p>
<pre><code>#page-wrap{
min-width:800px;
width:expression(document.body.clientWidth < 800? "800px": "auto" );
} </code></code></pre>
<h4>Resources for dimensions</h4>
<ul>
<li><a href="http://articles.sitepoint.com/article/top-ten-css-tricks">Top 10 CSS Tricks from SitePoint</a></li>
<li><a href="http://www.adamkparker.com/2009-04-23/cross-browser-minimum-height-css/">Cross Browser Min-height</a></li>
<li><a href="http://www.cssplay.co.uk/boxes/minwidth.html">Min-width for Internet Explorer</a></li>
<li><a href="http://www.w3schools.com/Css/css_dimension.asp">CSS Dimension Properties</a></li>
</ul>
<h3>Floats &amp; Clearing</h3>
<p>A float will place an element outside the normal flow of elements and moves the element right or left until it reaches the margin or padding of another block-level element.  Float and clear are some of the most powerful&#8212;and the most misunderstood&#8212;properties in CSS. To understand it, we must refer back to <strong>block-level</strong> vs. <strong>inline</strong> elements. </p>
<p><strong>Applying float to an element will automatically make it a block-level element.</strong> This means two things: 1) by default, all floated elements (even <code>&lt;span&gt;</code> and <code>&lt;strong&gt;</code>) will behave like block-level elements, 2) Giving an element both <code>float:left;</code> and <code>display:block;</code> is redundant and unnecessary. Also, using <code>display:inline</code> on a floated image is actually a very popular method of fixing many cross-browser quirks.</p>
<h4>Floating a div to clear a div</h4>
<p>Floating a div to clear a div is one of those things you stumble upon with some experimenting and frustration. What basically happens is that you can apply a float to a parent element that contains other floated elements and they will all equalize and clear properly:</p>
<h5>HTML</h5>
<pre><code>&lt;div class=&quot;parent-element&quot;&gt;
     &lt;div class=&quot;floating-element&quot;&gt;&lt;/div&gt;&lt;!--/.floating-element--&gt;
     &lt;div class=&quot;floating-element&quot;&gt;&lt;/div&gt;&lt;!--/.floating-element--&gt;
     &lt;div class=&quot;floating-element&quot;&gt;&lt;/div&gt;&lt;!--/.floating-element--&gt;
&lt;/div&gt;&lt;!--/.parent-element--&gt;</code></pre>
<h5>CSS</h5>
<pre><code>.floating-element   { float:left;width:33%; }
.parent-element     { float:left; }</code></pre>
<p>And, of course you&#8217;ll need some content in there to fill out the divs.</p>
<p>There are a lot of clearing techniques you can use to clear floated divs. Some require extra markup, some don&#8217;t work in IE 6 and some are great, but don&#8217;t apply to every situation. What did I wish I knew about clearing floats when I started? <strong>Everything</strong>.</p>
<h4>Resources for clear and float</h4>
<ul>
<li><a href="http://www.smashingmagazine.com/2007/05/01/css-float-theory-things-you-should-know/">CSS Float Theory</a></li>
<li><a href="http://www.w3schools.com/css/pr_class_float.asp">CSS Float Property</a></li>
<li><a href="http://www.quirksmode.org/css/clearing.html">Clearing Floats</a></li>
<li><a href="http://webdesign.about.com/od/advancedcss/a/aa010107.htm">Using Floats for Layout</a></li>
</ul>
<h3>Conditional Comments</h3>
<p>Back in 2004, when I really got into full-time Web design I used a lot of <strong>IE hacks</strong> and techniques to patch together sites in an attempt to achieve some level of cross browser compatibility. This can cause very bloated and slow loading style sheets. Everyone was doing it, heck, there were even articles about how to best organize your IE hacks.</p>
<p>Little by little the design community discovered a hidden gem buried within the functionality of the Triton rendering engine (Internet Explorer). You could use IE specific HTML to target specific versions of the browser and then load a special style sheet just to deal with those issues.</p>
<pre><code>&lt;!--[if IE]&gt;
Target all versions of IE
&lt;![endif]--&gt;</code><code>

&lt;!--[if lte IE 7]&gt;
Target all versions of IE that are less than or equal to &quot;7&quot;
&lt;![endif]--&gt;</code><code>

&lt;!--[if IE 6]&gt;
Target IE 6
&lt;![endif]--&gt;</code></pre>
<p>Using conditional comments to target IE and cut out your  hacks, will slim down your main style sheet, and help load the page quicker in browsers that don&#8217;t need the correction code.</p>
<h4>Resources for Conditional Comments</h4>
<ul>
<li><a href="http://www.quirksmode.org/css/condcom.html">Conditional Comments</a></li>
<li><a href="http://www.dedestruct.com/2008/04/03/how-to-css-conditional-comments/">How to: CSS Conditional Comments</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/ms537512%28VS.85%29.aspx">About Conditional Comments from Microsoft</a></li>
</ul>
<h3>Overflow &amp; Zoom</h3>
<p>Like many designers, if there&#8217;s time to be wasted on a project, it usually gets wasted dealing with IE 6 and some of it&#8217;s weirder quirks. This is where <strong>overflow</strong> and <strong>zoom</strong> have helped me a great deal.</p>
<h4>Overflow</h4>
<p>Many-a-times when I&#8217;ve encountered a serious layout issue, a simple application of <strong>overflow:hidden</strong> on the offensive div would solve the problem. It&#8217;s difficult to pin point specific issues for this, but it can happen in any browser (I just had it happen in Safari a couple weeks ago) and the overflow property can provide a quick solution to your cross browser woes.</p>
<h4>Zoom</h4>
<p>To my surprise, the zoom property is not very well know, but a very powerful tool in dealing with cross browser issues; particularly IE 6/7. Zoom is a proprietary IE property that actually does effect the zoom level of a page (if you set the zoom to 2 you&#8217;ll see everything get bigger). As a site effect it also triggers hasLayout on the offending element, and fixes a lot of layout issues. Try it out, it actually saves a lot of time.</p>
<pre><code>body { zoom:1; }</code></pre>
<p>Since hasLayout won&#8217;t trigger in any other browser, it&#8217;s generally thought to be safe to put zoom in your main style sheet, but it you&#8217;re doing IE specific work anyway, I&#8217;d advise putting it in with the rest of the IE CSS just in case there are any problems in the future, &quot;future proofing&quot;.</p>
<h4>Resources for Overflow &amp; Zoom</h4>
<ul>
<li><a href="http://www.webmasterworld.com/css/3637301.htm">Web Master World Forum</a></li>
<li><a href="http://www.bennadel.com/blog/1354-The-Power-Of-ZOOM-Fixing-CSS-Issues-In-Internet-Explorer.htm">The Power of Zoom</a></li>
<li><a href="http://www.quirksmode.org/css/overflow.html">About Overflow from QuirksMode</a></li>
</ul>
<h3>When CSS isn&#8217;t the Answer</h3>
<p>Believe it or not, CSS is not always the answer. Especially now when we live on a Web that is in the middle of the biggest browser war to date. Sometimes CSS just doesn&#8217;t do everything we want on as many platforms as we need it to. </p>
<p>Spending hours searching for a CSS solution to a non-critical element that can be easily fixed with JavaScript usually just isn&#8217;t worth it. Now that we have great libraries like <a href="http://jquery.com">jQuery</a> readily available to us, anyone well versed in CSS can quickly pick up JavaScript. And let me tell you&#8230; if I new more about JavaScript when I started it would have saved me a lot of time and frustration.</p>
<h3>Conclusion</h3>
<p>There are a lot of little idiosyncrasies with CSS that you&#8217;ll encounter over time with experience and frustration, but we&#8217;re looking for ways to minimize that frustration. The best advice I can give someone in dealing with CSS is the same advice someone gave me when I was in college: <strong>go to class</strong>. If you read the blogs, keep up with all the information and learn everything you can  you&#8217;ll save a lot of time when you do encounter the inevitable rendering problem. To be honest, half the battle is knowing what a bug is called so you can <a href="http://www.google.com/search?q=css">Google it</a>.</p>
<p>But of course an article like this always poses the question: <strong>What do you YOU wish you knew when you started?</strong></p>
<h3>About the Author</h3>
<p>Tim Wright is a web designer/developer and blogger. He has been an advocate for Web standards and accessibility since 2004. You can find more of his writing at <a href="http://www.csskarma.com">CSSKarma</a> or <a href="http://twitter.com/csskarma">follow Tim on Twitter</a>.</p>
<p>TJ Kelly is a web designer/developer from Boston, MA, USA. He specializes in UX/UI design, CSS/jQuery, WordPress, SEO, and Social Media. He&#8217;s passionate about W3C Web Standards, accessibility, and usability. Check out his blog and portfolio at <a href="http://www.tjkwebdesign.com">www.tjkelly.com</a> and <a href="http://www.twitter.com/tjkelly">follow TJ on Twitter</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.noupe.com/css/css-techniques-i-wish-i-knew-when-i-started-designing-websites.html/feed</wfw:commentRss>
		<slash:comments>76</slash:comments>
		</item>
		<item>
		<title>50+ Fresh CSS Techniques, Tutorials and Resources</title>
		<link>http://www.noupe.com/css/50-fresh-css-techniques-tutorials-and-resources.html</link>
		<comments>http://www.noupe.com/css/50-fresh-css-techniques-tutorials-and-resources.html#comments</comments>
		<pubDate>Wed, 02 Dec 2009 20:38:11 +0000</pubDate>
		<dc:creator>vitaly</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.noupe.com/?p=34239</guid>
		<description><![CDATA[<table width="650"><tr><td width="650"><div style="width:650px;">
      <img src="http://statisches.auslieferung.commindo-media-ressourcen.de/advertisement.gif" alt="" border="0" /><br />
      <a href="http://auslieferung.commindo-media-ressourcen.de/www/delivery/ck.php?zoneid=8" target="_blank"><img src="http://auslieferung.commindo-media-ressourcen.de/www/delivery/avw.php?zoneid=8" border="0" alt="" /></a>&nbsp;<a href="http://auslieferung.commindo-media-ressourcen.de/www/delivery/ck.php?zoneid=9" target="_blank"><img src="http://auslieferung.commindo-media-ressourcen.de/www/delivery/avw.php?zoneid=9" border="0" alt="" /></a>&nbsp;<a href="http://auslieferung.commindo-media-ressourcen.de/www/delivery/ck.php?zoneid=10" target="_blank"><img src="http://auslieferung.commindo-media-ressourcen.de/www/delivery/avw.php?zoneid=10" border="0" alt="" /></a>
    </div></td></tr></table>
&nbsp;&nbsp; By Paul Andrew Learning CSS and how to use it effectively can be a reasonably easy thing to do for a beginning web developer. In the hands of a seasoned professional, CSS can be stretched and pushed it to its limits where it can seem complicated and yet perfect at the same time. Being [...]]]></description>
			<content:encoded><![CDATA[<table width="650">
<tr>
<td width="650">
<div style="width:650px;">
      <img src="http://statisches.auslieferung.commindo-media-ressourcen.de/advertisement.gif" alt="Advertisement in " border="0" /><br />
      <a href="http://auslieferung.commindo-media-ressourcen.de/www/delivery/ck.php?zoneid=8" target="_blank"><img src="http://auslieferung.commindo-media-ressourcen.de/www/delivery/avw.php?zoneid=8" border="0" alt=" in "  /></a>&nbsp;<a href="http://auslieferung.commindo-media-ressourcen.de/www/delivery/ck.php?zoneid=9" target="_blank"><img src="http://auslieferung.commindo-media-ressourcen.de/www/delivery/avw.php?zoneid=9" border="0" alt=" in "  /></a>&nbsp;<a href="http://auslieferung.commindo-media-ressourcen.de/www/delivery/ck.php?zoneid=10" target="_blank"><img src="http://auslieferung.commindo-media-ressourcen.de/www/delivery/avw.php?zoneid=10" border="0" alt=" in "  /></a>
    </div>
</td>
</tr>
</table>
<p><em>By Paul Andrew</em></p>
<p>Learning <strong>CSS</strong> and how to use it effectively can be a reasonably easy thing to do for a beginning web developer. In the hands of a seasoned professional, CSS can be stretched and pushed it to its limits where it can seem complicated and yet perfect at the same time.</p>
<p>Being able to adapt to new ideas and different techniques, as well as seeking new solutions to old problems is part and parcel of being a web designer. And with the speed at which CSS development is constantly moving, keeping up with new developments can be challenging.</p>
<p>In this article, <strong>we&#8217;ll bring you up to date with the latest in CSS development</strong> through a collection of fresh CSS tutorials, techniques, and resources. We hope this extensive list will teach you something new, or else remind you of some methods you haven&#8217;t used for a while.</p>
<p><span id="more-34239"></span></p>
<h3>Menus, Buttons and Forms</h3>
<p><a href="http://inspectelement.com/tutorials/create-a-button-with-hover-and-active-states-using-css-sprites/">Create a Button with Hover and Active States using CSS Sprites</a><br />Some designers neglect the click state (<code>active:</code> property in CSS) in web design, either because they&#8217;re unaware of it, underestimate the importance of it, or are just lazy. It&#8217;s a simple effect that improves usability by giving the user feedback as to what they&#8217;ve clicked on, and can add depth to a design.</p>
<p class="showcase"><a href="http://inspectelement.com/tutorials/create-a-button-with-hover-and-active-states-using-css-sprites/"><img src="http://www.noupe.com/wp-content/uploads/2009/12/freshcss10.jpg" width="480" height="200" alt="Freshcss10 in "  /></a></p>
<p><a href="http://aext.net/2009/10/css-absolute-positioning-create-a-fancy-link-block/">CSS Absolute Positioning: Create A Fancy Link Block</a><br />Absolute positioning is a well-known CSS technique supported by all web browsers. If you position an element (an image, a table, or whatever) absolutely on your page, it will appear at the exact position you specify. In this tutorial, you&#8217;ll use absolute positioning to create a fancy link block.</p>
<p class="showcase"><a href="http://aext.net/2009/10/css-absolute-positioning-create-a-fancy-link-block/"><img src="http://www.noupe.com/wp-content/uploads/2009/12/freshcss8.jpg" width="480" height="200" alt="Freshcss8 in "  /></a></p>
<p><a href="http://www.p51labs.com/simply-buttons-v2/">Simply-Buttons v2</a><br />Cross-browser, custom HTML <code>&lt;button&gt;</code> elements with inactive, active, and hover states.</p>
<p class="showcase"><a href="http://www.p51labs.com/simply-buttons-v2/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss1.jpg" width="480" height="200" alt="Freshcss1 in "  /></a></p>
<p><a href="http://spyrestudios.com/how-to-create-a-sexy-vertical-sliding-panel-using-jquery-and-css3/">Create A Sexy Vertical Sliding Panel Using jQuery And CSS3</a><br />In this post you will learn how to create a flexible vertically-positioned sliding panel that simulates a drawer effect. Normally, this technique would be used for a horizontally-positioned sliding panel that would push everything else down, but with this technique, the panel overlays the content.</p>
<p class="showcase"><a href="http://spyrestudios.com/how-to-create-a-sexy-vertical-sliding-panel-using-jquery-and-css3/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss6.jpg" width="480" height="200" alt="Freshcss6 in "  /></a></p>
<p><a href="http://css-tricks.com/style-a-list-with-one-pixel/">Style a List with One Pixel</a><br />Using a one-pixel background image in CSS (<code>repeat-x</code> for a horizontal line, <code>repeat-y</code> for vertical, and <code>repeat</code> for a fill color) you&#8217;ll learn how to style a depth-chart looking unordered list.</p>
<p class="showcase"><a href="http://css-tricks.com/style-a-list-with-one-pixel/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss7.jpg" width="480" height="200" alt="Freshcss7 in "  /></a></p>
<p><a href="http://www.smashingmagazine.com/2009/12/02/pushing-your-buttons-with-practical-css3/">Pushing Your Buttons With Practical CSS3</a><br />&#8220;Calls to action are critical for any website, and a compelling, attention-grabbing, clickable button goes a long way toward driving that engagement. In the past, really awesome buttons needed extra markup, sliding doors or other trickery. We’ll show you here how to create nice button styles without any hacks or cheats.&#8221;</p>
<p class="showcase"><a href="http://www.smashingmagazine.com/2009/12/02/pushing-your-buttons-with-practical-css3/"><img src="http://www.noupe.com/wp-content/uploads/2009/12/large-buttons.png" width="487" height="214" alt="Large-buttons in "  /></a></p>
<p><a href="http://www.wittysparks.com/2009/09/21/build-multi-level-multi-column-multi-menus-with-pure-css/">Multi-level Multi-column Multi Menus with pure CSS</a><br />Have you ever successfully built a multi-level, multi-column, multi-menu, light-weight, and cross browser menu or navigation with pure CSS and without JavaScript? This tutorial will teach you how.</p>
<p class="showcase"><a href="http://www.wittysparks.com/2009/09/21/build-multi-level-multi-column-multi-menus-with-pure-css/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss3.jpg" width="480" height="200" alt="Freshcss3 in "  /></a></p>
<p><a href="http://aext.net/2009/09/elegant-drop-menu-with-css-only/">Elegant Drop Menu with CSS only</a><br />If you have a clean web site that&#8217;s become cluttered with extra content, categories, and pages, this clean and elegant menu offers a great space-saving solution.</p>
<p class="showcase"><a href="http://aext.net/2009/09/elegant-drop-menu-with-css-only/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss4.jpg" width="480" height="200" alt="Freshcss4 in "  /></a></p>
<p><a href="http://www.problogdesign.com/wordpress/how-to-create-a-beautiful-dropdown-blogroll-without-javascript/">Create a Beautiful Dropdown Blogroll Without JavaScript</a><br />This tutorial demonstrates how to style a drop-down menu to hold your blogroll content (instead of using the typically-ugly HTML <code>&lt;select&gt;</code> element). Done with pure CSS, but requires hacks to work with IE6.</p>
<p class="showcase"><a href="http://www.problogdesign.com/wordpress/how-to-create-a-beautiful-dropdown-blogroll-without-javascript/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss5.jpg" width="480" height="200" alt="Freshcss5 in "  /></a></p>
<p><a href="http://line25.com/tutorials/how-to-build-a-simple-button-with-css-image-sprites">Build a Simple Button with CSS Image Sprites</a><br />In this tutorial you&#8217;ll learn how to create a simple button using CSS sprites. The tutorial covers creation of the image in Photoshop and finishes with the coded example.</p>
<p class="showcase"><a href="http://line25.com/tutorials/how-to-build-a-simple-button-with-css-image-sprites"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss9.jpg" width="480" height="200" alt="Freshcss9 in "  /></a></p>
<p><a href="http://www.kamikazemusic.com/quick-tips/css3-hover-tabs-without-javascript/">CSS3 Hover Tabs without JavaScript</a><br />Using some new CSS3 techniques you&#8217;ll learn how to create a basic tabbed content area that changes on hover using pure CSS</p>
<p class="showcase"><a href="http://www.kamikazemusic.com/quick-tips/css3-hover-tabs-without-javascript/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss2.jpg" width="480" height="200" alt="Freshcss2 in "  /></a></p>
<p><a href="http://www.onextrapixel.com/2009/08/25/how-to-use-pure-css-to-style-web-form-dynamically-plus-12-awesome-javascript-plugins/">Use Pure CSS To Style a Web Form Dynamically</a><br />Form elements are normally styled by changing the border color or background color properties via CSS. This tutorial shows you how to style text field and textarea elements of varying widths with rounded-corner background images.</p>
<p class="showcase"><a href="http://www.onextrapixel.com/2009/08/25/how-to-use-pure-css-to-style-web-form-dynamically-plus-12-awesome-javascript-plugins/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss11.jpg" width="480" height="200" alt="Freshcss11 in "  /></a></p>
<p><a href="http://www.sohtanaka.com/web-design/horizontal-sub-nav-with-css-jquery/">Horizontal Sub-nav with CSS &amp; jQuery</a><br />In this tutorial, Soh Tanaka teaches you how to create an elegant horizontal sub-nav using CSS and a little jQuery for IE6 compatibility.</p>
<p class="showcase"><a href="http://www.sohtanaka.com/web-design/horizontal-sub-nav-with-css-jquery/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss12.jpg" width="480" height="200" alt="Freshcss12 in "  /></a></p>
<p><a href="http://sublimeorange.com/css/css3-speech-bubble/">CSS3 Speech Bubble</a><br />Learn how to create a speech bubble with HTML and CSS3.</p>
<p class="showcase"><a href="http://sublimeorange.com/css/css3-speech-bubble/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss13.jpg" width="480" height="200" alt="Freshcss13 in "  /></a></p>
<p><a href="http://aceinfowayindia.com/blog/2009/09/how-to-create-nice-scalable-css-based-breadcrumbs/">Create Nice Scalable CSS Based Breadcrumbs</a><br />This tutorial shows you how to create a scalable CSS-based breadcrumb navigation using a single graphic, some basic CSS, and an unordered list.</p>
<p class="showcase"><a href="http://aceinfowayindia.com/blog/2009/09/how-to-create-nice-scalable-css-based-breadcrumbs/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss14.jpg" width="480" height="200" alt="Freshcss14 in "  /></a></p>
<p><a href="http://friedcellcollective.net/outbreak/2009/10/04/fluid-searchbox/">Fluid Searchbox</a><br />Creating a search box that adjusts to the size of the browser window is simple, but becomes difficult when you add elements to the left and right of it, some being fixed width (width in px or em) and some fluid width (width in %). This article demonstrates a solution to this problem.</p>
<p class="showcase"><a href="http://friedcellcollective.net/outbreak/2009/10/04/fluid-searchbox/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss15.jpg" width="480" height="200" alt="Freshcss15 in "  /></a></p>
<p><a href="http://buildinternet.com/2009/10/using-rounded-corners-with-css3/">Using Rounded Corners with CSS3</a><br />As CSS3 gets closer to becoming the new standard for mainstream design, the days of rounded corners through elaborate background images is fading. In this tutorial you&#8217;ll learn how to create rounded corners using vendor-specific CSS3 techniques supported by Firefox and Safari.</p>
<p class="showcase"><a href="http://buildinternet.com/2009/10/using-rounded-corners-with-css3/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss16.jpg" width="480" height="200" alt="Freshcss16 in "  /></a></p>
<h3>Web Page Layout Techniques</h3>
<p><a href="http://net.tutsplus.com/videos/screencasts/the-ultimate-guide-to-creating-a-design-and-converting-it-to-html-and-css/">The Ultimate Guide to Creating a Design and Converting it to HTML and CSS</a><br />This in-depth screencast tutorial is the third part of a series that demonstrates how to create an iPhone app web site. This tutorial demonstrates the final step: converting the Photoshop design into HTML and CSS.</p>
<p class="showcase"><a href="http://net.tutsplus.com/videos/screencasts/the-ultimate-guide-to-creating-a-design-and-converting-it-to-html-and-css/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss17.jpg" width="480" height="200" alt="Freshcss17 in "  /></a></p>
<p><a href="http://designm.ag/tutorials/psd-to-html-clean-folio/">How to Code a Clean Portfolio Design with jQuery Slider</a><br />This tutorial will teach you how to slice and code a web page from a Photoshop design, plus teach you how to implement a jQuery image slider.</p>
<p class="showcase"><a href="http://designm.ag/tutorials/psd-to-html-clean-folio/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss18.jpg" width="480" height="200" alt="Freshcss18 in "  /></a></p>
<p><a href="http://sixrevisions.com/tutorials/web-development-tutorials/minimal-and-modern-layout-psd-to-xhtmlcss-conversion/">Minimal and Modern Layout: PSD to XHTML/CSS Conversion</a><br />This is the second part of a two-part series of creating a minimal and modern website layout in Photoshop. The part focuses on converting the design to styled markup.</p>
<p class="showcase"><a href="http://sixrevisions.com/tutorials/web-development-tutorials/minimal-and-modern-layout-psd-to-xhtmlcss-conversion/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss19.jpg" width="480" height="200" alt="Freshcss19 in "  /></a></p>
<p><a href="http://www.jankoatwarpspeed.com/post/2009/11/08/YouTube-adaptable-view-css-jquery.aspx">Create YouTube-like adaptable view using CSS and jQuery</a><br />Have you ever noticed the &quot;change view&quot; feature on YouTube that allows you to switch between normal and wide mode and thus expand/shrink the movie area? In this tutorial you&#8217;ll learn how to duplicate this feature using CSS and jQuery.</p>
<p class="showcase"><a href="http://www.jankoatwarpspeed.com/post/2009/11/08/YouTube-adaptable-view-css-jquery.aspx"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss20.jpg" width="480" height="200" alt="Freshcss20 in "  /></a></p>
<p><a href="http://woorkup.com/2009/10/07/how-to-distribute-elements-horizontally-using-css/">How to distribute elements horizontally using CSS</a><br />This article shows you how to resolve the problem of extra margin settings on first and last children that are distributed horizontally within a main container using CSS.</p>
<p class="showcase"><a href="http://woorkup.com/2009/10/07/how-to-distribute-elements-horizontally-using-css/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss21.jpg" width="480" height="200" alt="Freshcss21 in "  /></a></p>
<p><a href="http://designm.ag/tutorials/sticky-sidenav-layout/">Sticky (Fixed) SideNav Layout with CSS</a><br />This tutorial teaches you how to build a frame-like fixed sidebar navigation menu that stays in place when the page is scrolled.</p>
<p class="showcase"><a href="http://designm.ag/tutorials/sticky-sidenav-layout/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss22.jpg" width="480" height="200" alt="Freshcss22 in "  /></a></p>
<p><a href="http://www.webdesignerwall.com/tutorials/css-design-out-of-the-box/">CSS: Design Out Of The Box</a><br />In this informative post, the author discusses a number of example website designs that break away from typical columned and boxed layout. The article includes a number of tips and best practices that can help designers accomplish a similar style.</p>
<p class="showcase"><a href="http://www.webdesignerwall.com/tutorials/css-design-out-of-the-box/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss55.jpg" width="480" height="200" alt="Freshcss55 in "  /></a></p>
<p><a href="http://www.webdesignerwall.com/tutorials/5-simple-but-useful-css-properties/">5 Simple, But Useful CSS Properties</a><br />Another article from Web Designer Wall, this time discussing five well-supported, practical, but rarely-used, CSS properties</p>
<p class="showcase"><a href="http://www.webdesignerwall.com/tutorials/5-simple-but-useful-css-properties/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss54.jpg" width="480" height="200" alt="Freshcss54 in "  /></a></p>
<p><a href="http://webdeveloperplus.com/css/25-incredibly-useful-css-tricks-you-should-know/">25 Incredibly Useful CSS Tricks You Should Know</a><br />This article describes 25 useful CSS tips and techniques to help you design great web interfaces.</p>
<p class="showcase"><a href="http://webdeveloperplus.com/css/25-incredibly-useful-css-tricks-you-should-know/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss56.jpg" width="480" height="200" alt="Freshcss56 in "  /></a></p>
<p><a href="http://net.tutsplus.com/tutorials/html-css-techniques/11-classic-css-techniques-made-simple-with-css3/">11 Classic CSS Techniques Made Simple with CSS3</a><br />You shouldn&#39;t limit yourself to old techniques when there&#39;s a new age coming. This new age includes the use of CSS3. In this tutorial, you&#8217;ll learn eleven different effects that can be achieved quite easily with CSS3 but would normally be quite time-consuming with standard CSS methods.</p>
<p class="showcase"><a href="http://net.tutsplus.com/tutorials/html-css-techniques/11-classic-css-techniques-made-simple-with-css3/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss52.jpg" width="480" height="200" alt="Freshcss52 in "  /></a></p>
<p><a href="http://woorkup.com/2009/10/18/5-rules-to-write-more-readable-css-files/">5 Rules To Write More Readable CSS Files</a><br />This article describes five  practical rules that can help you write well-structured and more readable CSS files.</p>
<p class="showcase"><a href="http://woorkup.com/2009/10/18/5-rules-to-write-more-readable-css-files/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss53.jpg" width="480" height="200" alt="Freshcss53 in "  /></a></p>
<h3>Text and Typography</h3>
<p><a href="http://net.tutsplus.com/tutorials/html-css-techniques/six-ways-to-improve-your-web-typography/">6 Ways To Improve Your Web Typography</a><br />Because of the many options available, not to mention cross-browser differences, improving typography on the web is not always simple. In this post you&#8217;ll learn six different ways to improve typography on your web projects.</p>
<p class="showcase"><a href="http://net.tutsplus.com/tutorials/html-css-techniques/six-ways-to-improve-your-web-typography/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss23.jpg" width="480" height="200" alt="Freshcss23 in "  /></a></p>
<p><a href="http://line25.com/tutorials/create-a-letterpress-effect-with-css-text-shadow">Create a Letterpress Effect with CSS Text-Shadow</a><br />The letterpress effect is becoming hugely popular in web design, and with a couple of modern browsers now showing support for the text-shadow CSS3 property it&#8217;s now simple and easy to create the effect with pure CSS.</p>
<p class="showcase"><a href="http://line25.com/tutorials/create-a-letterpress-effect-with-css-text-shadow"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss25.jpg" width="480" height="200" alt="Freshcss25 in "  /></a></p>
<h3>Images, Galleries and Sprites</h3>
<p><a href="http://cssglobe.com/post/6089/3-easy-and-fast-css-techniques-for-faux-image">3 Easy and Fast CSS Techniques for Faux Image Cropping</a><br />This article is a summary of 3 fast and easy CSS techniques you can use to display only a portion of an image in your content. Because the images aren&#8217;t literally cropped, the method is termed &#8220;Faux Image Cropping&#8221;.</p>
<p class="showcase"><a href="http://cssglobe.com/post/6089/3-easy-and-fast-css-techniques-for-faux-image"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss26.jpg" width="480" height="251" alt="Freshcss26 in "  /></a></p>
<p><a href="http://markuptips.com/htmlcss-tips/use-css-to-build-a-map-with-hoverable-regions/">Use CSS to build a map with hoverable regions</a><br />In this article you will learn how to how to build a map with hoverable regions, using CSS and a single image.</p>
<p class="showcase"><a href="http://markuptips.com/htmlcss-tips/use-css-to-build-a-map-with-hoverable-regions/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss27.jpg" width="480" height="200" alt="Freshcss27 in "  /></a></p>
<p><a href="http://css-tricks.com/date-display-with-sprites/">Date Display Technique with Sprites</a><br />This article on CSS-Tricks demonstrates how to display the date on WordPress blog posts using image sprites &#8212; the same method that&#8217;s used on the Learning jQuery website.</p>
<p class="showcase"><a href="http://css-tricks.com/date-display-with-sprites/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss28.jpg" width="480" height="200" alt="Freshcss28 in "  /></a></p>
<p><a href="http://www.tutorial9.net/web-tutorials/building-faster-websites-with-css-sprites/">Building Faster Websites with CSS Sprites</a><br />In this tutorial you&#8217;ll learn how to take advantage of CSS sprites to greatly increase your website&#8217;s speed.</p>
<p class="showcase"><a href="http://www.tutorial9.net/web-tutorials/building-faster-websites-with-css-sprites/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss29.jpg" width="480" height="200" alt="Freshcss29 in "  /></a></p>
<p><a href="http://css-tricks.com/perfect-full-page-background-image/">Perfect Full Page Background Image</a><br />Another technique from CSS-Tricks, this time demonstrating how to implement a full-page background image that fills the entire page, will scale the image as needed, retain image proportions, does not cause scrollbars, and is cross-browser compatible.</p>
<p class="showcase"><a href="http://css-tricks.com/perfect-full-page-background-image/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss30.jpg" width="480" height="200" alt="Freshcss30 in "  /></a></p>
<p><a href="http://tutorialzine.com/2009/11/beautiful-apple-gallery-slideshow/">A Beautiful Apple-style Slideshow Gallery With CSS &amp; jQuery</a><br />Learn how to build an Apple-like slideshow gallery, similar to what Apple uses to showcase their products.</p>
<p class="showcase"><a href="http://tutorialzine.com/2009/11/beautiful-apple-gallery-slideshow/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss31.jpg" width="480" height="200" alt="Freshcss31 in "  /></a></p>
<p><a href="http://line25.com/tutorials/how-to-create-a-pure-css-polaroid-photo-gallery">How To Create a Pure CSS Polaroid Photo Gallery</a><br />Magical things can be created by combining various CSS properties, especially when some of the new CSS3 tricks are thrown into the mix. In this tutorial you&#8217;ll learn how to build a Polaroid photo gallery with a re-stacking hover effect using pure CSS.</p>
<p class="showcase"><a href="http://line25.com/tutorials/how-to-create-a-pure-css-polaroid-photo-gallery"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss32.jpg" width="480" height="200" alt="Freshcss32 in "  /></a></p>
<p><a href="http://css-tricks.com/video-screencasts/74-editable-css3-image-gallery/">Editable CSS3 Image Gallery</a><br />A screencast from CSS-Tricks that demonstrates how to create a fancy image gallery with some HTML5, CSS3, and jQuery. Works best in a WebKit browser.</p>
<p class="showcase"><a href="http://css-tricks.com/video-screencasts/74-editable-css3-image-gallery/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss33.jpg" width="480" height="200" alt="Freshcss33 in "  /></a></p>
<p><a href="http://www.zurb.com/article/305/easily-turn-your-images-into-polaroids-wi">Turn Your Images Into Polaroids with CSS3</a><br />In the first part of this tutorial you&#8217;ll create a grid of images that&#8217;s linked to a Flickr account. In the second part, you&#8217;ll spice it up by giving the images a pure CSS Polaroid effect.</p>
<p class="showcase"><a href="http://www.zurb.com/article/305/easily-turn-your-images-into-polaroids-wi"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss34.jpg" width="480" height="200" alt="Freshcss34 in "  /></a></p>
<p><a href="http://css-tricks.com/css-sprites/">CSS Sprites: What They Are, Why They&#8217;re Cool, and How To Use Them</a><br />This is a comprehensive discussion of the technique of CSS image sprites, by Chris Coyier. The article has been recently updated to include more up-to-date information and methods.</p>
<p class="showcase"><a href="http://css-tricks.com/css-sprites/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss35.jpg" width="480" height="200" alt="Freshcss35 in "  /></a></p>
<h3>Fresh CSS Frameworks</h3>
<p><a href="http://anthonyshort.com.au/scaffold/">CSScaffold Framework</a><br />CSScaffold is a a new type of CSS Framework, built with PHP, that helps speed up your development time by doing the hard work for you. Its power lies in its ability to extend CSS and generate CSS found in other CSS frameworks.</p>
<p class="showcase">
<p><a href="http://xcss.antpaw.org/">xCSS &#8211; Object Oriented CSS Framework</a><br />xCSS is a lightweight framework, still in beta, that allows you to take advantage of an object-oriented workflow, which means a dramatic cut-down in development time through the use of variables and other handy features.</p>
<p class="showcase"><a href="http://xcss.antpaw.org/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss37.jpg" width="480" height="200" alt="Freshcss37 in "  /></a></p>
<p><a href="http://ecsstender.org/">eCSStender.org</a><br />eCSStender is a JavaScript library that lets you write CSS without having to use browser-specific properties and hacks. Extensions built with eCSStender greatly simplify the design process because you can author modern CSS using advanced selectors, properties such as border-radius, and custom font faces, all of which work in IE6.</p>
<p class="showcase"><a href="http://ecsstender.org/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss39.jpg" width="480" height="200" alt="Freshcss39 in "  /></a></p>
<h3>Cross Browser Hacks, Fixes and Guides</h3>
<p><a href="http://robots.thoughtbot.com/post/170612102/render-alternate-layouts-in-ie6-using-only-css">Render alternate layouts in IE6 with only CSS</a><br />Although this may not be something you would do on a client project, this article shows you how to create an alternate layout IE6 users using CSS and a conditional comment.</p>
<p class="showcase"><a href="http://robots.thoughtbot.com/post/170612102/render-alternate-layouts-in-ie6-using-only-css"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss40.jpg" width="480" height="200" alt="Freshcss40 in "  /></a></p>
<p><a href="http://sixrevisions.com/web-development/definitive-guide-to-taming-the-ie6-beast/">Definitive Guide to Taming the IE6 Beast</a><br />A useful collection of IE6 hacks and fixes that will, as the title implies, help you tame the beast that is IE6.</p>
<p class="showcase"><a href="http://sixrevisions.com/web-development/definitive-guide-to-taming-the-ie6-beast/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss41.jpg" width="480" height="200" alt="Freshcss41 in "  /></a></p>
<p><a href="http://www.virtuosimedia.com/tutorials/ultimate-ie6-cheatsheet-how-to-fix-25-internet-explorer-6-bugs">Ultimate IE6 Cheatsheet: How To Fix 25+ Internet Explorer 6 Bugs</a><br />The author of this article &#39;has scoured the web&#39; for resources and fixes for IE6 and put them all together in this cheatsheet/reference manual as a resource for anyone who has to deal with Internet Explorer 6 on a regular basis.</p>
<p class="showcase"><a href="http://www.virtuosimedia.com/tutorials/ultimate-ie6-cheatsheet-how-to-fix-25-internet-explorer-6-bugs"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss42.jpg" width="480" height="200" alt="Freshcss42 in "  /></a></p>
<p><a href="http://www.onderhond.com/tools/ie6fixer">ie6fixer</a><br />ie6fixer is a tool specifically designed to ease the pain of the IE6 CSS debugger. The tool was conceived to decrease the monkey work when starting an ie6 CSS fix file by applying a series of basic fixes that are known to conquer many problems and cause as little harm as possible. It should fix 40-60% of all IE6 issues and problems, with just one click, outputting rough CSS that can be placed in a separate section and can be used as a solid start for debugging IE6 issues.</p>
<p class="showcase"><a href="http://www.onderhond.com/tools/ie6fixer"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss43.jpg" width="480" height="200" alt="Freshcss43 in "  /></a></p>
<h3>Useful CSS Resources</h3>
<p><a href="http://cssglobe.com/post/6295/cssg-collection-free-comment-styles">CSSG Collection: Free Comment Styles</a><br />Designing the dreaded comments section of a web page can be a pain. To help you with this, CSS Globe is giving away a collection of comment styles that you can use on your own projects to save you a lot of time and agony.</p>
<p class="showcase"><a href="http://cssglobe.com/post/6295/cssg-collection-free-comment-styles"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss44.jpg" width="480" height="200" alt="Freshcss44 in "  /></a></p>
<p><a href="http://www.smashingmagazine.com/2009/07/13/css-3-cheat-sheet-pdf/">CSS 3 Cheat Sheet (PDF)</a><br />This printable CSS 3 Cheat Sheet (PDF), first published on SM in July 2009, offers a complete listing of all the properties, selector types, and allowed values in the current CSS 3 specification from the W3C. Each property is provided in a section that attempts to match it with the section (module) that it is most actively associated within the W3C specification. Next to each property is a listing of the expected values that that property takes.</p>
<p class="showcase"><a href="http://www.smashingmagazine.com/2009/07/13/css-3-cheat-sheet-pdf/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss45.jpg" width="480" height="200" alt="Freshcss45 in "  /></a></p>
<p><a href="http://woorkup.com/2009/10/02/css2-visual-cheat-sheet/">Cascading Style Sheet Level 2 Visual Cheat Sheet</a><br />This cheat sheet (3 pages) contains an essential reference to CSS2 properties with detailed descriptions and some sample code. The simple visual style used to design this sheet allows you to find, at a glance, everything you&#8217;re looking for.</p>
<p class="showcase"><a href="http://woorkup.com/2009/10/02/css2-visual-cheat-sheet/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss46.jpg" width="480" height="200" alt="Freshcss46 in "  /></a></p>
<p><a href="http://www.vcarrer.com/2009/09/css-specificity-cheat-sheet.html">CSS Specificity &#8211; Cheat Sheet</a><br />A common difficulty with CSS is determining what CSS rule will be applied on the page. This cheat sheet can help you better understand CSS specificity.</p>
<p class="showcase"><a href="http://www.vcarrer.com/2009/09/css-specificity-cheat-sheet.html"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss47.jpg" width="480" height="200" alt="Freshcss47 in "  /></a></p>
<p><a href="http://www.bestwebframeworks.com/">Best Web-Frameworks &#8211; Find and compare PHP, Ruby, Python, Java, JS and CSS Frameworks</a><br />This useful resource helps you compare almost all CSS, PHP, Ruby, Python, Java and JavaScript frameworks, so you can make the right choice for your project.</p>
<p class="showcase"><a href="http://www.bestwebframeworks.com/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss48.jpg" width="480" height="200" alt="Freshcss48 in "  /></a></p>
<p><a href="http://tutorialfeed.blogspot.com/2009/10/visual-cheat-sheet-css-compatiblity.html">Visual Cheat Sheet: CSS Compatibility with Internet Explorer 6, 7 and 8</a><br />This Visual Cheat Sheet will help you understand CSS behavior in the three commonly-used versions of Internet Explorer. It includes information on @rules, element selectors, attribute selectors, pseudo-classes, border and layout properties, and more.</p>
<p class="showcase"><a href="http://tutorialfeed.blogspot.com/2009/10/visual-cheat-sheet-css-compatiblity.html"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss49.jpg" width="480" height="200" alt="Freshcss49 in "  /></a></p>
<p><a href="http://astuteo.com/slickmap/">SlickMap CSS &#8211; A Visual Sitemapping Tool for Web Developers</a><br />SlickMap CSS is a simple stylesheet for displaying finished sitemaps directly from HTML unordered list navigation. It’s suitable for most web sites – accommodating up to three levels of page navigation and additional utility links – and can easily be customized to meet your own individual needs, branding, or style preferences.</p>
<p class="showcase"><a href="http://astuteo.com/slickmap/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss50.jpg" width="480" height="200" alt="Freshcss50 in "  /></a></p>
<p><a href="http://www.cssbasics.com/">CSS Basics</a><br />CSS Basics is divided into 18 chapters, covering all aspects of CSS, from CSS classes and IDs to the more difficult pseudo elements and positioning. CSS basics covers a wide range of information so it&#8217;s valuable for those learning the basics of CSS as well as experienced CSS developers. Each chapter is downloadable and printable and you also have the option to download the entire series in a single PDF file. </p>
<p class="showcase"><a href="http://www.cssbasics.com/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/11/freshcss51.jpg" width="480" height="200" alt="Freshcss51 in "  /></a></p>
<h3>Further Reading</h3>
<p><a href="http://meiert.com/en/blog/20091015/html-css-and-web-development-practices/">HTML, CSS, and Web Development Practices: Past, Present, and Future</a></p>
<p><a href="http://anidea.com/technology/css-best-practices-for-modern-designs/">CSS Best Practices for Modern Designs</a></p>
<p><a href="http://reinholdweber.com/css/guidelines-for-writing-accessible-css/">Guidelines for Writing Accessible CSS</a></p>
<p><a href="http://www.typesett.com/2009/09/css-selectors-a-guide-to-the-common-the-rare/">CSS Selectors – A Guide To The Common &amp; The Rare</a></p>
<p><a href="http://www.webdesignerdepot.com/2009/08/5-css3-design-enhancements-that-you-can-use-today/">5 CSS3 Design Enhancements That You Can Use Today</a></p>
<p><a href="http://designreviver.com/tips/trick-out-your-css-with-server-side-code/">Trick Out Your CSS With Server Side Code</a></p>
<h4>About the author</h4>
<p><em>Paul Andrew is a freelance web designer. He is chief admin for  <a href="http://speckyboy.com/">Speckyboy &#8211; Design Magazine</a>, a web design, web development and graphic design resource blog. Follow him on Twitter here: <a href="http://twitter.com/speckyboy">twitter.com/speckyboy</a>.</em></p>
<p><em>(ll)</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.noupe.com/css/50-fresh-css-techniques-tutorials-and-resources.html/feed</wfw:commentRss>
		<slash:comments>46</slash:comments>
		</item>
		<item>
		<title>Essential CSS/HTML Lists Styling Techniques</title>
		<link>http://www.noupe.com/css/essential-html-lists-styling-techniques.html</link>
		<comments>http://www.noupe.com/css/essential-html-lists-styling-techniques.html#comments</comments>
		<pubDate>Wed, 04 Nov 2009 16:52:58 +0000</pubDate>
		<dc:creator>vitaly</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.noupe.com/?p=29965</guid>
		<description><![CDATA[<table width="650"><tr><td width="650"><div style="width:650px;">
      <img src="http://statisches.auslieferung.commindo-media-ressourcen.de/advertisement.gif" alt="" border="0" /><br />
      <a href="http://auslieferung.commindo-media-ressourcen.de/www/delivery/ck.php?zoneid=8" target="_blank"><img src="http://auslieferung.commindo-media-ressourcen.de/www/delivery/avw.php?zoneid=8" border="0" alt="" /></a>&nbsp;<a href="http://auslieferung.commindo-media-ressourcen.de/www/delivery/ck.php?zoneid=9" target="_blank"><img src="http://auslieferung.commindo-media-ressourcen.de/www/delivery/avw.php?zoneid=9" border="0" alt="" /></a>&nbsp;<a href="http://auslieferung.commindo-media-ressourcen.de/www/delivery/ck.php?zoneid=10" target="_blank"><img src="http://auslieferung.commindo-media-ressourcen.de/www/delivery/avw.php?zoneid=10" border="0" alt="" /></a>
    </div></td></tr></table>
&nbsp;&nbsp; By Justin Johnson Certain elements in HTML lend themselves to many situations when marking up a website, one of the more useful of these elements is the HTML list. Using lists, a developer can markup horizontal navigation, dropdown navigation, a list of links, and even scrolling content panels (with the help of Javascript). These [...]]]></description>
			<content:encoded><![CDATA[<table width="650">
<tr>
<td width="650">
<div style="width:650px;">
      <img src="http://statisches.auslieferung.commindo-media-ressourcen.de/advertisement.gif" alt="Advertisement in " border="0" /><br />
      <a href="http://auslieferung.commindo-media-ressourcen.de/www/delivery/ck.php?zoneid=8" target="_blank"><img src="http://auslieferung.commindo-media-ressourcen.de/www/delivery/avw.php?zoneid=8" border="0" alt=" in "  /></a>&nbsp;<a href="http://auslieferung.commindo-media-ressourcen.de/www/delivery/ck.php?zoneid=9" target="_blank"><img src="http://auslieferung.commindo-media-ressourcen.de/www/delivery/avw.php?zoneid=9" border="0" alt=" in "  /></a>&nbsp;<a href="http://auslieferung.commindo-media-ressourcen.de/www/delivery/ck.php?zoneid=10" target="_blank"><img src="http://auslieferung.commindo-media-ressourcen.de/www/delivery/avw.php?zoneid=10" border="0" alt=" in "  /></a>
    </div>
</td>
</tr>
</table>
<p><em>By Justin Johnson</em></p>
<p>Certain elements in HTML lend themselves to many situations when marking up a website, one of the more useful of these elements is the HTML list. Using <strong>lists</strong>, a developer can markup horizontal navigation, dropdown navigation, a list of links, and even scrolling content panels (with the help of Javascript). These features can help developers build new sites and applications as well as integrate new content into existing applications.</p>
<p><span id="more-29965"></span></p>
<h3>Unordered/Ordered Lists</h3>
<p>Unorderd lists are recommened to be used with a list of items where order is irrelevant. With unordered lists (and all lists actually) the W3C <em>discourage authors from using lists purely as a means of indenting text. This is a stylistic issue and is properly handled by style sheets.</em><br />
Ordered lists on the other hand are encouraged to be used when order matters for the list elements, example:  A cooking recipe or turn-by-turn directions. For the examples in this article it is possible to substitute an ol for a ul or vice-versa. That choice is left to your discretion.</p>
<p>In it&#8217;s simplest form an ordered list or unordered list (referred to going forward interchangably as &#8216;a list&#8217;) would contain similar markup to the following:</p>
<pre name="code" class="php">
&lt;!-- an unordered list example --&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href="#"&gt;List Item One&lt;/li&gt;
	&lt;li&gt;&lt;a href="#"&gt;List Item Two&lt;/li&gt;
	&lt;li&gt;&lt;a href="#"&gt;List Item three&lt;/li&gt;
	&lt;li&gt;&lt;a href="#"&gt;List Item Four&lt;/li&gt;
	&lt;li&gt;&lt;a href="#"&gt;List Item Five&lt;/li&gt;
&#038;lt/ul&gt;

&lt;!-- an ordered list example --&gt;
&lt;ol&gt;
	&lt;li&gt;&lt;a href="#"&gt;List Item One&lt;/li&gt;
	&lt;li&gt;&lt;a href="#"&gt;List Item Two&lt;/li&gt;
	&lt;li&gt;&lt;a href="#"&gt;List Item three&lt;/li&gt;
	&lt;li&gt;&lt;a href="#"&gt;List Item Four&lt;/li&gt;
	&lt;li&gt;&lt;a href="#"&gt;List Item Five&lt;/li&gt;
&#038;lt/ol&gt;
</pre>
<p>Examining the box model for a list reveals the following:</p>
<p><img src="http://www.noupe.com/wp-content/uploads/2009/11/liboxmodel.gif" alt="Liboxmodel in " />	</p>
<p>In short both ul&#8217;s and ol&#8217;s are considered block level elements, as are each one of their child li tags. As such we can apply margin and padding to both items on all four sides. In regards to the bullet point for ul&#8217;s (or the numeral for ol&#8217;s) a left margin will move both the bullet/numeral to the right as well as the text, while padding while increase the space between the bullet/numeral and the content of the li.</p>
<h4>The Basics of Styling Lists</h4>
<p>Styling a list to be used as it is intended, a list, is a fairly straightforward task. To replace the bullets in an ol with a sample graphic icon you could do something like the following:</p>
<p><strong>HTML</strong></p>
<pre name="code" class="php">
&lt;ul&gt;
	&lt;li&gt;&lt;a href="#"&gt;List Item One&lt;/li&gt;
	&lt;li&gt;&lt;a href="#"&gt;List Item Two&lt;/li&gt;
	&lt;li&gt;&lt;a href="#"&gt;List Item three&lt;/li&gt;
	&lt;li&gt;&lt;a href="#"&gt;List Item Four&lt;/li&gt;
	&lt;li&gt;&lt;a href="#"&gt;List Item Five&lt;/li&gt;
&#038;lt/ul&gt;
</pre>
<p><strong>CSS</strong></p>
<pre name="code" class="css">
ul li{
	list-style:none; /* removes the default bullet */
	background: url(../images/icon-for-li.gif) no-repeat left center;
	/*adds a background image to the li*/
	padding-left: 10px
	/* this would be the width of the background image, plus a little more to space things out properly */
	}
</pre>
<p>Basic styling to the numbers of an ordered list is just as straightforward. Consider the following list and CSS.</p>
<pre name="code" class="php">
&lt;ol&gt;
	&lt;li&gt;&lt;a href="#"&gt;List Item One&lt;/li&gt;
	&lt;li&gt;&lt;a href="#"&gt;List Item Two&lt;/li&gt;
	&lt;li&gt;&lt;a href="#"&gt;List Item three&lt;/li&gt;
	&lt;li&gt;&lt;a href="#"&gt;List Item Four&lt;/li&gt;
	&lt;li&gt;&lt;a href="#"&gt;List Item Five&lt;/li&gt;
&#038;lt/ol&gt;
</pre>
<p><strong>CSS</strong></p>
<p>With the CSS we will change the font of the ol to change the font of the numerals, then we&#8217;ll target the a tags inside our li&#8217;s to change their font in order to give them<br />
a different visual representation than the numerals.</p>
<pre name="code" class="css">
ol{
	font-family: Georgia, "Times New Roman", serif;
	color: #ccc;
	font-size: 16px;
}
ol li a{
	font-family: Arial, Verdana, sans-serif;
	font-size: 12px;
}
</pre>
<h4>More Advanced Uses for List</h4>
<p><strong>Accessible-Image Tab Rollovers</strong></p>
<p>While this is an older article, published in 2003, the information contained in it is very valuable. Dan Cedarholm of SimpleBits explains how to create an image based navigation with rollovers using only CSS, HTML and images. If you haven&#8217;t read this article before it&#8217;s definately worth reading. The code below is a summarized version, but Dan offer&#8217;s a full explanation of the code on his site <a href="http://simplebits.com/notebook/2003/09/30/accessible_imagetab_rollovers.html">SimpleBits</a></p>
<p><strong>CSS</strong></p>
<pre name="code" class="php">
&lt;ul id="nav"&gt;
&lt;li id="thome"&gt;&lt;a href="#"&gt;Home&lt;/li&gt;
&lt;li id="tservices"&gt;&lt;a href="#"&gt;Our Services&lt;/li&gt;
&lt;li id="tabout"&gt;&lt;a href="#"&gt;About Us&lt;/li&gt;
&#038;lt/ul&gt;
</pre>
<p><strong>HTML</strong></p>
<pre name="code" class="php">
#nav {
margin: 0;
padding: 0;
height: 20px;
list-style: none;
display: inline;
overflow: hidden;
}

#nav li {
margin: 0;
padding: 0;
list-style: none;
display: inline;
}

#nav a {
float: left;
padding: 20px 0 0 0;
overflow: hidden;
height: 0px !important;
height /**/:20px; /* for IE5/Win only */
}

#nav a:hover {
background-position: 0 -20px;
}

#nav a:active, #nav a.selected {
background-position: 0 -40px;
}
</pre>
<pre name="code" class="php">
#thome a  {
width: 40px;
background: url(home.gif) top left no-repeat;
}
#tservices a  {
width: 40px;
background: url(services.gif) top left no-repeat;
}
#tabout a  {
width: 40px;
background: url(about.gif) top left no-repeat;
}
</pre>
<p><em>Examples</em></p>
<p><em>Note that some of these examples use a modified version of this technique in which one large image (aka an image sprite) is used instead of individual graphics for each nav item.</em></p>
<p class="showcase"><a href="http://www.patrogers.com"><img src="http://media2.smashingmagazine.com/wp-content/uploads/images/ordered-unordered-lists-css/ss-patrogers.jpg" alt="Ss-patrogers in " /><br />Pat Rogers Harley Davidson</a></p>
<p class="showcase"><a href="http://www.fastcompany.com"><img src="http://media2.smashingmagazine.com/wp-content/uploads/images/ordered-unordered-lists-css/ss-fastcompany.jpg" alt="Ss-fastcompany in " /><br />Fast Company</a></p>
<p class="showcase"><a href="http://www.nbc.com"><img src="http://media2.smashingmagazine.com/wp-content/uploads/images/ordered-unordered-lists-css/ss-nbc.jpg" alt="Ss-nbc in " /><br />NBC</a></p>
<p class="showcase"><a href="http://www.toysrus.com"><img src="http://media2.smashingmagazine.com/wp-content/uploads/images/ordered-unordered-lists-css/ss-toysrus.jpg" alt="Ss-toysrus in " /><br />ToysR&#8217;Us</a></p>
<p><strong>CSS &#8220;Sliding Doors&#8221;</strong></p>
<p>While the above method is great if you know what your navigation items are going to be, it doesn&#8217;t present a problem if you&#8217;re using a content management or blogging system like WordPress that allows you to create and rename pages at will. The following technique has been around for a while but is just as useful, if not more useful than the previous technique. Douglas Bowman wrote an article for A List Apart in 2003 titled: <a href="http://www.alistapart.com/articles/slidingdoors/">Sliding Doors of CSS</a></p>
<p>This technique uses two background images that can tile horizontally to encompass a long page title or shrink horizontally to encompass a short page title. Our HTML markup for the list is very similar to the above technique. Our main changes will center around how we style the list with CSS. </p>
<pre name="code" class="php">
&lt;div id="header"&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#"&gt;Home&lt;/li&gt;
&lt;li id="current"&gt;&lt;a href="#"&gt;Services&lt;/li&gt;
&lt;li&gt;&lt;a href="#"&gt;About Us&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
</pre>
<pre name="code" class="css">
#header {
float:left;
width:100%;
background:#DAE0D2 url("bg.gif") repeat-x bottom;
font-size:93%;
line-height:normal;
}
#header ul {
margin:0;
padding:10px 10px 0;
list-style:none;
}
#header li {
float:left;
background:url("left.gif") no-repeat left top;
margin:0;
padding:0 0 0 9px;
}
#header a {
float:left;
display:block;
background:url("right.gif") no-repeat right top;
padding:5px 15px 4px 6px;
text-decoration:none;
font-weight:bold;
color:#765;
}
/* Commented Backslash Hack
hides rule from IE5-Mac \*/
#header a {float:none;}
/* End IE5-Mac hack */
#header a:hover {
color:#333;
}
#header #current {
background-image:url("left_on.gif");
}
#header #current a {
background-image:url("right_on.gif");
color:#333;
padding-bottom:5px;
}
</pre>
<p><em>Examples</em></p>
<p class="showcase"><a href="http://www.espn.com"><img src="http://media2.smashingmagazine.com/wp-content/uploads/images/ordered-unordered-lists-css/ss-espn.jpg" alt="Ss-espn in " /><br />ESPN</a></p>
<p class="showcase"><a href="http://www.engadget.com/"><img src="http://media2.smashingmagazine.com/wp-content/uploads/images/ordered-unordered-lists-css/ss-engadget.jpg" alt="Ss-engadget in " /><br />EnGadget</a></p>
<p class="showcase"><a href="http://net.tutsplus.com/"><img src="http://media2.smashingmagazine.com/wp-content/uploads/images/ordered-unordered-lists-css/ss-nettuts.jpg" alt="Ss-nettuts in " /><br />NetTuts</a></p>
<p class="showcase"><a href="http://www.tigerdirect.com/"><img src="http://media2.smashingmagazine.com/wp-content/uploads/images/ordered-unordered-lists-css/ss-tigerdirect.jpg" alt="Ss-tigerdirect in " /><br />TigerDirect</a></p>
<p><strong>Content Scrollers</strong><br />One trend that is becoming increasingly more and more popular is the concept of content scrollers or sliders. These block level elements cycle through (or are toggled via user interaction) a predetermined set of content which can be any web content. This used to be a technique that was reserved soley for Flash, however, with the advent of Javascript libraries such as jQuery, mooTools, and Prototype it is now possible to do this strictly with HTML/Javascript/CSS. Our code snippet below is an example using jQuery and a jQuery plugin called <a href="http://www.gmarwaha.com/jquery/jcarousellite/">jCarousel Lite</a>. </p>
<p><strong>HTML</strong></p>
<pre name="code" class="php">
&lt;button class="prev"&gt;Prev&lt;/button&gt;
&lt;button class="next"&gt;Next&lt;/button&gt;

&lt;div class="anyClass"&gt;
    &lt;ul&gt;
        &lt;li&gt;&lt;img src="someimage" alt="" width="100" height="100" &gt;&lt;/li&gt;
        &lt;li&gt;&lt;img src="someimage" alt="" width="100" height="100" &gt;&lt;/li&gt;
        &lt;li&gt;&lt;img src="someimage" alt="" width="100" height="100" &gt;&lt;/li&gt;
        &lt;li&gt;&lt;img src="someimage" alt="" width="100" height="100" &gt;&lt;/li&gt;
    &lt;/ul&gt;
&lt;/div&gt;
</pre>
<pre name="code" class="php">
        $(function() {
            $(".anyClass").jCarouselLite({
                btnNext: ".next",
                btnPrev: ".prev"
            });
        });
    </pre>
</p>
<p>Examples of this technique can be found below. Note that not all of the examples below use jCarousel Lite, but they do portray a similar technique/effect.</p>
<p class="showcase"><a href="http://www.fairwaystyles.com"><img src="http://media2.smashingmagazine.com/wp-content/uploads/images/ordered-unordered-lists-css/ss-fairway.jpg" alt="Ss-fairway in " /></a></p>
<p class="showcase"><a href="http://www.qcitymetro.com"><img src="http://media2.smashingmagazine.com/wp-content/uploads/images/ordered-unordered-lists-css/ss-slider1.jpg" alt="Ss-slider1 in " /></a></p>
<p class="showcase"><a href="http://cssglobe.com/post/4004/easy-slider-15-the-easiest-jquery-plugin-for-sliding"><img src="http://media2.smashingmagazine.com/wp-content/uploads/images/ordered-unordered-lists-css/ss-slider2.jpg" alt="Ss-slider2 in " /></a></p>
<h3>Ordered Lists: A Side Note</h3>
<p>While ol and ul can technically be considered interchangable, an ol was designed to be used for items where order is important.  One great example of this could be a list of links that shows a user where they have been, otherwise known as &#8220;breadcrumbs&#8221;. In the following list you&#8217;ll find some step by step tutorials for building CSS breadcrumbs.</p>
<p><img src="http://media2.smashingmagazine.com/wp-content/uploads/images/ordered-unordered-lists-css/ss-breadcrumb.jpg" alt="Ss-breadcrumb in " /></p>
<p><strong>Resources for CSS BreadCrumbs</strong></p>
<ul>
<li><a href="http://www.savio.no/artikler/a/331/css-breadcrumb-using-background-image">Simple CSS Breadcrumbs using a background image</a></li>
<li><a href="http://veerle.duoh.com/blog/comments/simple_scalable_css_based_breadcrumbs/">Simple Scalabe CSS Based Breadcrumbs</a></li>
</ul>
<h3>Lists &amp; CSS Resources</h3>
<p>The following resources discuss technique and theory in greater detail in regards to CSS and HTML lists.</p>
<ul>
<li><a href="http://www.alistapart.com/articles/taminglists/">A List Apart: CSS Design: Taming Lists</a></li>
<li><a href="http://www.alvit.de/css-showcase/css-galleries-tabs-navigation-showcase.php">CSS Tabs &amp; Navigation Showcase</a></li>
<li><a href="http://www.cssmenubuilder.com/home">CSS Menu Builder</a></li>
<li><a href="http://cssglobe.com/post/4004/easy-slider-15-the-easiest-jquery-plugin-for-sliding">Easy Slider jQuery Plugin</a></li>
</ul>
<h4>About the author</h4>
<p><em>Justin Johnson is Rich Media / UI Developer at <a href="http://www.edreamz.com">E-dreamz</a> an established Web Development company in Charlotte, NC. He spends his days meticulously hand crafting CSS and Javascript as well as tinkering with PHP, MySQL, SQL, ColdFusion &amp; Flex. Justin spends his spare time with his wife and son.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.noupe.com/css/essential-html-lists-styling-techniques.html/feed</wfw:commentRss>
		<slash:comments>53</slash:comments>
		</item>
		<item>
		<title>Styling Design Elements: 5 Beautiful Post Headings</title>
		<link>http://www.noupe.com/css/styling-design-elements-5-beautiful-post-headings.html</link>
		<comments>http://www.noupe.com/css/styling-design-elements-5-beautiful-post-headings.html#comments</comments>
		<pubDate>Tue, 22 Sep 2009 09:50:02 +0000</pubDate>
		<dc:creator>Editorial</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[TUTORIAL]]></category>
		<category><![CDATA[DESIGN]]></category>

		<guid isPermaLink="false">http://www.noupe.com/?p=23975</guid>
		<description><![CDATA[<table width="650"><tr><td width="650"><div style="width:650px;">
      <img src="http://statisches.auslieferung.commindo-media-ressourcen.de/advertisement.gif" alt="" border="0" /><br />
      <a href="http://auslieferung.commindo-media-ressourcen.de/www/delivery/ck.php?zoneid=8" target="_blank"><img src="http://auslieferung.commindo-media-ressourcen.de/www/delivery/avw.php?zoneid=8" border="0" alt="" /></a>&nbsp;<a href="http://auslieferung.commindo-media-ressourcen.de/www/delivery/ck.php?zoneid=9" target="_blank"><img src="http://auslieferung.commindo-media-ressourcen.de/www/delivery/avw.php?zoneid=9" border="0" alt="" /></a>&nbsp;<a href="http://auslieferung.commindo-media-ressourcen.de/www/delivery/ck.php?zoneid=10" target="_blank"><img src="http://auslieferung.commindo-media-ressourcen.de/www/delivery/avw.php?zoneid=10" border="0" alt="" /></a>
    </div></td></tr></table>
&nbsp;&nbsp; We will start a new set of posts that will demonstrate different way of creating and styling various design elements. Today our focus will be on &#8220;Post Headings&#8220;, how to style and markup this important block that comes before any post. Usually &#8220;Post Headings&#8221; consists of 5 essential elements: 1- Post Title 2- Publishing [...]]]></description>
			<content:encoded><![CDATA[<table width="650">
<tr>
<td width="650">
<div style="width:650px;">
      <img src="http://statisches.auslieferung.commindo-media-ressourcen.de/advertisement.gif" alt="Advertisement in " border="0" /><br />
      <a href="http://auslieferung.commindo-media-ressourcen.de/www/delivery/ck.php?zoneid=8" target="_blank"><img src="http://auslieferung.commindo-media-ressourcen.de/www/delivery/avw.php?zoneid=8" border="0" alt=" in "  /></a>&nbsp;<a href="http://auslieferung.commindo-media-ressourcen.de/www/delivery/ck.php?zoneid=9" target="_blank"><img src="http://auslieferung.commindo-media-ressourcen.de/www/delivery/avw.php?zoneid=9" border="0" alt=" in "  /></a>&nbsp;<a href="http://auslieferung.commindo-media-ressourcen.de/www/delivery/ck.php?zoneid=10" target="_blank"><img src="http://auslieferung.commindo-media-ressourcen.de/www/delivery/avw.php?zoneid=10" border="0" alt=" in "  /></a>
    </div>
</td>
</tr>
</table>
<p>We will start a new set of posts that will demonstrate different way of creating and styling various design elements. Today our focus will be on &#8220;<strong>Post Headings</strong>&#8220;, how to style and markup this important block that comes before any post.</p>
<p>Usually &#8220;<strong>Post Headings</strong>&#8221; consists of 5 essential elements:</p>
<ul class="post">
<li>1- Post Title</li>
<li>2- Publishing Date</li>
<li>3- Author Name</li>
<li>4- Post Category ot Tags</li>
<li>5- Number of Comments</li>
</ul>
<p>What we are going to do is play around with these 5 puzzle pieces to get 5 different and pretty &#8220;<strong>Post Headings</strong>&#8221; for your blog posts.  All the headings mentioned here actually need only couple of lines of CSS. </p>
<p class="demo-download"><a title="Styling Post Headings" href="http://noupe.com/examples/post-headings/headings.html">Take a look at the demo</a></p>
<p><span id="more-23975"></span></p>
<h4>Artistic Post Heading</h4>
<p><img src="http://noupe.com/examples/post-headings/images/demo4.jpg" alt="Demo4 in " /></p>
<p>The HTML will look like this:</p>
<pre name="code" class="html">
&lt;div id=&quot;block4&quot;&gt;
    &lt;div class=&quot;title-wrap&quot;&gt;
    &lt;h1&gt;&lt;a href=&quot;#&quot; &gt;7 Steps for Systematizing The Design &amp; Build Process%u2026&lt;/a&gt;&lt;/h1&gt;
    &lt;h5&gt;&lt;span&gt;Sep 21, 2009&lt;/span&gt; | Comments &lt;a href=&quot;3&quot; &gt;67&lt;/a&gt; | by Cameron&lt;/h5&gt;
    &lt;/div&gt;
&lt;/div&gt;
</pre>
<p>and the CSS: </p>
<pre name="code" class="css">
#block4 {
    background:url(images/bg.jpg);
	border:3px solid #542437;
	font-family:Georgia,&quot;Times New Roman&quot;,Times,serif;
        margin:20px 0px;
	padding:20px;
	z-index:5;
}
#block4 h1 {
	font-size:190%;
	letter-spacing:0px;
	line-height:42px;
	margin:0 0 10px;
	text-align:center;
	text-transform:uppercase;
}

#block4 h1 a{
	color:#542437
}

#block4 h5 a{
	color:#542437
}

#block4 h5 {
	border-bottom:1px solid #4C4C4C;
	border-top:1px solid #4C4C4C;
	color:#6A6969;
	font-size:13px;
	font-weight:100;
	letter-spacing:3px;
	line-height:21px;
	padding:5px 0;
	text-transform:uppercase;
}
#block4 .title-wrap{
	background:url(images/trans_bg.png);
	padding:10px;
	border:1px dashed #542437;
}
</pre>
<h4>Traditional Post Heading</h4>
<p><img src="http://noupe.com/examples/post-headings/images/demo1.jpg" alt="Demo1 in " /></p>
<p>The HTML will look like this:</p>
<pre name="code" class="html">
&lt;div id=&quot;block1&quot;&gt;
        &lt;h2&gt;Simplicity in Good Web Design&lt;/h2&gt;
        &lt;p&gt;
            by &lt;em&gt; &lt;a title=&quot;&quot; href=&quot;http://www.noupe.com&quot; &gt;Noura Yehia&lt;/a&gt; |
            &lt;a href=&quot;&quot; class=&quot;comments&quot;&gt;Comments&lt;/a&gt; |
            &lt;a href=&quot;&quot; class=&quot;cat&quot;&gt;Category Name&lt;/a&gt;|
            &lt;a href=&quot;&quot;&gt;Sep 10&lt;/a&gt;&lt;/em&gt;
        &lt;/p&gt;
&lt;/div&gt;
</pre>
<p>and the CSS: </p>
<pre name="code" class="css">
#block1 {
	background:#D5E4E8 none repeat scroll 0 0;
	border:3px solid #B5CAD0;
	margin:20px 0px;
	padding:20px;
}
#block1 h2{
	font-family:Georgia,&quot;Times New Roman&quot;,Times,serif;
	font-weight:normal;
	text-shadow:0 0 1px #000;
	color:#444444;
	font-size:2em;
	padding:2px 0 0;
	text-transform:capitalize;
	line-height:1.2em;
	margin:0 0 10px;
}
#block1 p em {
	color:#999999;
	font-family:Georgia,&quot;Times New Roman&quot;,Times,serif;
	font-style:italic;
	letter-spacing:0.2em;
	margin:10px 0 20px;
	text-transform:none;
	padding-bottom:10px;
}
#block1 a{
color: #F50077;
text-decoration:none;
}
#block1 a:hover{
text-decoration:underline
}

#block1 .comments{
	background:url(images/comments.png) no-repeat;
	padding:0 0 0 25px
}
#block1 .cat{
	background:url(images/folder.png) no-repeat;
	padding:0 0 5px 30px;
}
</pre>
<h4>Lines Post Heading</h4>
<p><img src="http://noupe.com/examples/post-headings/images/demo2.jpg" alt="Demo2 in " /></p>
<p>The HTML will look like this:</p>
<pre name="code" class="html">
&lt;div id=&quot;block2&quot;&gt;
&lt;div class=&quot;date-stamp&quot;&gt;
				&lt;div class=&quot;day&quot;&gt;4th&lt;/div&gt;
				&lt;div class=&quot;month&quot;&gt;Mar/09&lt;/div&gt;
			&lt;/div&gt;

&lt;h2&gt;7 Rules for Mixing Multiple Fonts in Good Web Design&lt;/h2&gt;
&lt;p class=&quot;details&quot;&gt;&lt;span class=&quot;type&quot;&gt;Full-Time&lt;/span&gt; &lt;em&gt;at&lt;/em&gt; Magnet Media, Inc. (ZIO Pro) &lt;em&gt;(Manhattan, NY)&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;
</pre>
<p>and the CSS: </p>
<pre name="code" class="css">
#block2{
	border:3px solid #A8635A;
	color:#fff;
	font-family:Georgia,&quot;Times New Roman&quot;,Times,serif;
	margin:20px 0px;
	padding:20px;
}

#block2 h2{
	background:#ECD078;
	color:#542437;
	font-size:160%;
	font-style:normal;
	font-weight:bold;
	letter-spacing:-1px;
	line-height:115%;
	margin-top:5px;
	padding:0;
}
#block2 p.details{
	background:#542437
}
#block2 .date-stamp {
	background:#FFF;
	border:1px solid #ECD078;
	color:#542437;
	float:left;
	font-style:italic;
	height:62px;
	margin:0 10px;
	overflow:hidden;
	padding:0;
	width:72px;
}
#block2 .day {
	font-size:22px;
	font-weight:normal;
	padding:7px 0 0;
	text-align:center;
}
#block2 .month {
	font-size:11px;
	padding:2px 0 0;
	text-align:center;
	text-transform:uppercase;
}
</pre>
<h4>Fancy Post Heading</h4>
<p><img src="http://noupe.com/examples/post-headings/images/demo3.jpg" alt="Demo3 in " /></p>
<p>The HTML will look like this:</p>
<pre name="code" class="html">
&lt;div id=&quot;block3&quot;&gt;
    &lt;p class=&quot;date&quot;&gt;Sep &lt;span&gt;10&lt;/span&gt;&lt;/p&gt;
    &lt;h1&gt;CSS: Design Out Of The Box&lt;/h1&gt;
    &lt;p class=&quot;tags&quot;&gt;&lt;span&gt;Tagged in:&lt;/span&gt;
    &lt;a href=&quot;#&quot; &gt;CSS&lt;/a&gt;,
    &lt;a href=&quot;#&quot;&gt;Design Trends&lt;/a&gt;,
     &lt;a href=&quot;#&quot; &gt;inspiration&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
</pre>
<p>and the CSS: </p>
<pre name="code" class="css">
#block3 {
	background:#92FF2C;
	border:3px solid #F50077;
	font-family:Georgia,&quot;Times New Roman&quot;,Times,serif;
	margin:20px 0px;
	padding:20px;
	position:relative;
	z-index:5;
}

#block3 .date {
	background:#F50077 none repeat scroll 0 0;
	color:#92FF2C;
	font-size:130%;
	height:40px;
	left:-55px;
	line-height:30%;
	padding:20px 0 5px;
	position:absolute;
	text-align:center;
	text-transform:uppercase;
	top:0;
	width:54px;
}
#block3 .date span {
	display:block;
	font-size:170%;
	font-style:italic;
	font-variant:normal;
	letter-spacing:-1px;
	line-height:90%;
}
#block3 .tags {
	text-transform:capitalize;
}
#block3 .tags a{
	color:#F50077;
	font-weight:bold;
}
#block3 h1, h2 {
	color:#2B2B2B;
	font-size:190%;
	font-weight:bold;
	letter-spacing:-1px;
	line-height:100%;
	margin-left:-2px;
	padding:0 0 8px;
}
</pre>
<h4>Colorful Post Heading</h4>
<p><img src="http://noupe.com/examples/post-headings/images/demo5.jpg" alt="Demo5 in " /></p>
<p>The HTML will look like this:</p>
<pre name="code" class="html">
&lt;div id=&quot;block5&quot;&gt;
    &lt;div class=&quot;date_block&quot;&gt;
        &lt;div class=&quot;day&quot;&gt;4th/Mar&lt;/div&gt;
        &lt;div class=&quot;comments&quot;&gt;10 Comments&lt;/div&gt;
    &lt;/div&gt;
    &lt;div style=&quot;padding: 10px;&quot;&gt;
        &lt;h2&gt;&lt;a href=&quot;#&quot;&gt;Creating a Great Portfolio Site&lt;/a&gt;&lt;/h2&gt;
        &lt;span class=&quot;author&quot;&gt;by &lt;a href=&quot;#&quot;&gt;&lt;span&gt;Noura Yehia&lt;/span&gt;&lt;/a&gt;, Posted in &lt;a href=&quot;#&quot;&gt;Tips and Tricks&lt;/a&gt;&lt;/span&gt;
    &lt;/div&gt;
&lt;/div&gt;
</pre>
<p>and the CSS: </p>
<pre name="code" class="css">
#block5 {
	background:#27453A;
	border:3px solid #D95B43;
	color:#ECD078;
	font-family:Georgia,&quot;Times New Roman&quot;,Times,serif;
	margin:20px 0px;
	padding:20px;
}

#block5 .date_block {
	border-left:1px solid #D95B43;
	display:block;
	float:right;
	font-style:italic;
	height:50px;
	margin:0 10px;
	padding:10px 20px;
	width:90px;
}

#block5 .day {
	font-size:22px;
	font-weight:normal;
	padding:0 0 20px;
	text-align:center;
}
#block5 .comments {
	background:transparent url(images/comments.png) no-repeat scroll 0 5px;
	font-size:11px;
	padding:2px 0 0 20px;
	text-align:center;
}

#block5 h2{
	border-bottom:1px solid #D95B43;
	font-size:24px;
	font-weight:normal;
	letter-spacing:-1px;
	line-height:26px;
}
#block5 h2 a {
	border:medium none;
	color:#468E76;
	text-decoration:none;
}
#block5 .author a {
	color:#D95B43;
	font-weight:bold;
	text-decoration:none;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.noupe.com/css/styling-design-elements-5-beautiful-post-headings.html/feed</wfw:commentRss>
		<slash:comments>57</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached (user agent is rejected)
Database Caching 1/7 queries in 0.004 seconds using memcached
Object Caching 614/1155 objects using memcached
Content Delivery Network via media.smashingmagazine.com/cdn_noupe (user agent is rejected)

Served from: www.noupe.com @ 2010-09-02 19:32:41 -->