<?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>instantShift &#187; Steven Bradley</title>
	<atom:link href="http://www.instantshift.com/author/is-steven/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.instantshift.com</link>
	<description>Daily Resource for Web Designers and Developers.</description>
	<lastBuildDate>Tue, 07 Sep 2010 12:48:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Why Colors Can Make or Break Your Design</title>
		<link>http://www.instantshift.com/2010/05/21/why-colors-can-make-or-break-your-design/</link>
		<comments>http://www.instantshift.com/2010/05/21/why-colors-can-make-or-break-your-design/#comments</comments>
		<pubDate>Fri, 21 May 2010 13:16:46 +0000</pubDate>
		<dc:creator>Steven Bradley</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[blue]]></category>
		<category><![CDATA[color]]></category>
		<category><![CDATA[color theory]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[green]]></category>
		<category><![CDATA[pink]]></category>
		<category><![CDATA[red]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[yellow]]></category>

		<guid isPermaLink="false">http://www.instantshift.com/?p=2512</guid>
		<description><![CDATA[Color will be one of the first things anyone notices when visiting your site and it will be a large part of the initial impressions people form about you, your website, and your business. Color sets a mood and creates an emotional response in your audience.
Set the wrong mood or create an undesired emotional response [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin: 4px 0px 10px 20px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.instantshift.com%2F2010%2F05%2F21%2Fwhy-colors-can-make-or-break-your-design%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.instantshift.com%2F2010%2F05%2F21%2Fwhy-colors-can-make-or-break-your-design%2F" height="61" width="51" /></a></div><p>Color will be one of the first things anyone notices when visiting your site and it will be a large part of the initial impressions people form about you, your website, and your business. <a href="http://www.instantshift.com/2009/04/18/80-rainbow-colors-inspired-photos-and-pictures/"><strong>Color sets a mood</strong></a> and <a href="http://www.instantshift.com/2009/04/28/70-more-rainbow-colors-inspired-photos-and-pictures/"><strong>creates an emotional response</strong></a> in your audience.</p>
<p>Set the wrong mood or create an undesired emotional response and little you do after will matter. You will have put people in the wrong frame of mind to absorb your content or buy your products and services. <a href="http://www.colormatters.com/market_whycolor.html"><strong>Color matters</strong></a>.</p>
<p>There&#8217;s <a href="http://www.digital-web.com/articles/the_red_queen_color_theory/"><strong>a lot for designer&#8217;s to learn about when it comes to color</strong></a>. A lot more than any one article can hope to deliver. If you haven&#8217;t studied color before consider this post an introduction that provides a path to further study. If you have studied color to some degree consider this post another in the steps along the path you previously started.<br />
<span id="more-2512"></span><br />
<br clear="all"/></p>
<p>We&#8217;ll quickly walk through color theory, the meaning different colors convey, and some thoughts on a few color schemes. First a little more information about why color is so important.</p>
<p><strong>You may be interested in the following related articles as well. </strong></p>
<ul>
<li><a href="http://www.instantshift.com/2009/11/11/why-is-social-interaction-important-for-a-website/"><strong>Why is Social Interaction Important For a Website</strong></a></li>
<li><a href="http://www.instantshift.com/2010/03/22/are-you-just-a-freelancer-or-a-successful-one/"><strong>Are You Just a Freelancer? Or a Successful One?</strong></a></li>
<li><a href="http://www.instantshift.com/2008/10/19/list-of-top-social-media-network-sites/"><strong>List Of Top Social Media Network Sites</strong></a></li>
<li><a href="http://www.instantshift.com/2009/12/01/30-top-blogs-for-social-media-updates/"><strong>30 Top Blogs For Social Media Updates</strong></a></li>
<li><a href="http://www.instantshift.com/2009/04/26/how-to-create-a-better-online-portfolio/"><strong>How to Create A Better Online Portfolio</strong></a></li>
</ul>
<p>Please feel free to join us and you are always welcome to share your thoughts even if you have more reference links that our readers may like.</p>
<p></p>
<p>Don’t forget to <a rel="external nofollow" href="http://feeds2.feedburner.com/ishift"><img src="http://www.instantshift.com/images/rss.png" alt="Subscribe to our RSS-feed" style="float:none;padding:0;margin:0;border:0;" align="absmiddle" /> <strong>subscribe to our RSS-feed</strong></a> and <a rel="external nofollow" href="http://twitter.com/instantshift"><img src="http://www.instantshift.com/images/twitter.png" alt="Follow us on Twitter" style="float:none;padding:0;margin:0;border:0;" align="absmiddle" /> <strong>follow us on Twitter</strong></a> &mdash; for recent updates.</p>
<p><div style="padding-left:150px;"><script type="text/javascript">_bsap.drop('18455f93e4fb797679148ac419c87226', 1243233);</script></div>
<br />
<br clear="all"/></p>
<div class="newpost">
<h1><span>Why Color is Important</span></h1>
<p>Somewhere in the evolution of human beings sight became our most important sense for survival. Most of us rely on sight greatly and our initial impressions of anything new are predominantly based on visual cues.</p>
<p>Marketing research has reported that approximately 80% of what we assimilate through the senses, is visual, and that much of that visual input relates to color. <a rel="external nofollow" href="http://brandandmarket.com/dont-over-look-this-key-elements-impact-on-your-branding-and-marketing/"><strong>Brands are often defined by color</strong></a> (Big Blue &#8211; IBM) even to the point where there have been <a rel="external nofollow" href="http://www.colormatters.com/color_trademark.html"><strong>color trademark infringement lawsuits</strong></a>.</p>
<p>Color plays a vitally important role in the world in which we live. Color can sway thinking, change actions, and cause reactions. It can irritate or soothe your eyes, raise your blood pressure or suppress your appetite. Color conveys meaning. It&#8217;s not enough to choose a color scheme for your website, because you like the way the colors look. You need to understand what messages different colors are sending to your audience and choose accordingly.</p>
<div class="newpost" style="padding-left:40px;">
<img src="http://www.instantshift.com/wp-content/uploads/2010/05/wcmobyd-01.jpg" alt="instantShift - Why Color Can Make or Break Your Design" title="instantShift - Why Color Can Make or Break Your Design" width="560" class="alignnone size-full top_m" />
</div>
<p><br clear="all"/></p>
<p>A famous example of color choices is McDonald&#8217;s fast food restaurants. After commissioning a study about color McDonald&#8217;s learned that the color combination of yellow and red tended to make people hungry and then want to leave. Perfect for a fast food chain as it promotes both sales and a quick turnover. Is it any wonder the arches are golden and sit atop of field of red that contains the McDonald&#8217;s name?</p>
<p>Color has also been used in the <a rel="external nofollow" href="http://findarticles.com/p/articles/mi_m3830/is_n7_v43/ai_16111307/"><strong>well being of hospital patients</strong></a>. Different color palettes might be use for different rooms or for different parts of the hospital. One set of colors soothing and uplifting for a patient, another set of colors designed to maximize visibility and productivity for staff.</p>
<div class="newpost" style="padding-left:40px;">
<h4><span>Color Matters</span></h4>
<p><img src="http://www.instantshift.com/wp-content/uploads/2010/05/wcmobyd-02.jpg" alt="instantShift - Why Color Can Make or Break Your Design" title="instantShift - Why Color Can Make or Break Your Design" width="560" class="alignnone size-full top_m" />
</div>
<p><br clear="all"/></p>
<p><br clear="all"/></p>
<h1><span>Brief Introduction to Color Theory: Definitions</span></h1>
<p>We <a rel="external nofollow" href="http://www.smashingmagazine.com/2010/02/02/color-theory-for-designers-part-2-understanding-concepts-and-terminology/"><strong>define color</strong></a> in 3 ways. By name, by purity, and by luminosity or the amount of light. We use a variety of <a rel="external nofollow" href="http://www.vanseodesign.com/web-design/color-theory/"><strong>terms to describe color</strong></a> in these 3 ways.</p>
<ul>
<li><strong>Hue</strong> is the actual color of an object. Red, green, and blue are all different hues</li>
<li><strong>Chroma</strong> is the purity of a hue in relation to gray. Adding shades of gray to a hue reduces chroma</li>
<li><strong>Saturation</strong> is also the degree of purity of a hue. It&#8217;s similar to chroma, but not quite the same thing. It&#8217;s how strong (highly saturated) or weak a color is. As with chroma, adding gray reduces saturation.</li>
<li><strong>Intensity</strong> is how bright or dull a color is. Adding white or black lowers intensity. A color that is both intense and highly saturated, has a high chroma.</li>
<li><strong>Value</strong> is how much light is reflected from a color and is how light or dark a hue is. Adding white increases value. Adding black decreases value.</li>
<li><strong>Shade</strong> is the result of adding black to a hue</li>
<li><strong>Tint</strong> is the result of adding white to a hue.</li>
<li><strong>Tone</strong> is the result of adding gray to a hue.</li>
</ul>
<p>You probably remember your primary colors, red, yellow, and blue. You&#8217;d mix red and yellow to get orange or mix blue and yellow to get green. Each color is reflecting light and as we add more colors we actually subtract how many colors are reflected. This is a subtractive system.</p>
<p>Online we use an additive system to create colors. We aren&#8217;t seeing reflected colors, but rather colored light. Instead of a red, yellow, blue system we use a red, green, blue or RGB system. When combining colors we add more color, hence the additive system.</p>
<div class="newpost" style="padding-left:40px;">
<img src="http://www.instantshift.com/wp-content/uploads/2010/05/wcmobyd-03.jpg" alt="instantShift - Why Color Can Make or Break Your Design" title="instantShift - Why Color Can Make or Break Your Design" width="560" class="alignnone size-full top_m" /><br />
<br clear="all"/>
</div>
<p>Color wheels are a way to represent the various characteristics of color defined above and there are a variety of color wheels to show different characteristics. One might be useful to show tints of a color and another might be useful to show shades of a color. Since there are different ways to express color relationships, there are different color wheels to represent those relationships.</p>
<p>The color wheel below is an RGB color wheel. If you start at the very top and draw an equilateral triangle inside the wheel, the 3 corners of the triangle will touch red, green, and blue, which are our primary colors in the RGB system.</p>
<p><br clear="all"/></p>
<h1><span>The Meaning of Colors</span></h1>
<p><a rel="external nofollow" href="http://www.smashingmagazine.com/2010/01/28/color-theory-for-designers-part-1-the-meaning-of-color/"><strong>Colors convey different meanings</strong></a>, however there&#8217;s no evidence to support a universal system of <a rel="external nofollow" href="http://www.vanseodesign.com/web-design/color-meaning/"><strong>color meaning</strong></a>. Color symbolism is mostly a cultural thing. In Western cultures white is used for weddings. In Eastern cultures, white is the color of funerals. Depending on your audience the color white can convey two very different things.</p>
<p>Some <a rel="external nofollow" href="http://blog.is4hotels.com/web-design/the-meaning-of-colors/"><strong>color symbolism</strong></a> extends past culture and becomes global. Red is typically a color than means stop for example.</p>
<p>When looking at the table below keep in mind that most of the<a rel="external nofollow" href="http://www.brandingstrategyinsider.com/2006/11/brand_identity_.html"> <strong>color associations</strong></a> listed are likely for a Western audience and that some of these associations may not be what your audience will perceive when seeing the color listed. Determine who your audience is before determining <a rel="external nofollow" href="http://www.1stwebdesigner.com/design/color-psychology-website-design/"><strong>what your choice in color means</strong></a>.</p>
<table class="post_color-meaning" cellspacing="0">
<tr>
<th width="35%">Color</th>
<th>Associations</th>
</tr>
<tr>
<td>Warm Colors</td>
<td>fire, warmth, passion, energy, impulsiveness, happiness, coziness, comfort, attention getting, inviting, harmonious</td>
</tr>
<tr>
<td>Cool Colors</td>
<td>water, calm, trust, professionalism, sadness, melancholy, professional, harmonious, detached</td>
</tr>
<tr>
<td>Red</td>
<td>fire, blood, intense, energy, war, danger, strength, power, determination, action, confidence, courage, vitality, passion, desire, love, increases metabolism, respiration, and blood pressure, high visibility</td>
</tr>
<tr>
<td>Yellow</td>
<td>sun, joy, happiness, wisdom, intellectual energy, stimulates mental activity, generates muscle energy, warming, cheerful, pleasant, can become dingy</td>
</tr>
<tr>
<td>Blue</td>
<td>sky, sea, slows metabolism, breathing, and heart rate, masculine, trust, loyalty, wisdom, intelligence, expertise, confidence, stability, depth, calming, suppresses appetite</td>
</tr>
<tr>
<td>Orange</td>
<td>energy, happiness, healthy food (citrus), joy, sunshine, the tropics, enthusiasm, happiness, fascination, creativity, determination, attraction, success, encouragement, stimulation, strength, increases appetite, fall, harvest</td>
</tr>
<tr>
<td>Green</td>
<td>growth, hope, freshness, fertility, financial wealth, healing, stability, endurance, harmony, safety, life, well being, lack of experience</td>
</tr>
<tr>
<td>Purple</td>
<td>stability, energy, wealth, extravagance, royalty, power, nobility, luxury, ambition, wisdom, dignity, independence, creativity, mystery, magic, feminine, artificial</td>
</tr>
<tr>
<td>White</td>
<td>light, goodness, innocence, purity, virginity, positive connotations, clean, safe</td>
</tr>
<tr>
<td>Black</td>
<td>power, elegance, formality, death, evil, mystery, strength, authority, elegant, fear, unknown</td>
</tr>
<tr>
<td>Gray</td>
<td>sorrow, detachment, isolation, responsibility, conservative, non-invasive, security, maturity, dependability, willingness to comply</td>
</tr>
<tr>
<td>Brown</td>
<td>earth, material things, order, convention, stability, solid, wholesome
	</td>
</tr>
</table>
<div class="newpost" style="padding-left:40px;">
<img src="http://www.instantshift.com/wp-content/uploads/2010/05/wcmobyd-04.jpg" alt="instantShift - Why Color Can Make or Break Your Design" title="instantShift - Why Color Can Make or Break Your Design" width="560" class="alignnone size-full top_m" /><br />
<br clear="all"/>
</div>
<p><br clear="all"/></p>
<h1><span>Color Schemes</span></h1>
<p>Everything to this point has been concerned with individual colors. When more than one color is used or you use different tones, shades, and tints of colors, you&#8217;ve created a <a rel="external nofollow" href="http://www.smashingmagazine.com/2010/02/08/color-theory-for-designer-part-3-creating-your-own-color-palettes/"><strong>color scheme</strong></a>. Many <a rel="external nofollow" href="http://www.instantshift.com/2008/09/22/35-websites-with-bold-colour-schemes/"><strong>color schemes</strong></a> arise out of the color wheel and the positional relationship of one color to others on the wheel.</p>
<ul>
<li><strong>Monochromatic</strong> color schemes are formed by varying tones of a single color, moving toward the center or edge of the color wheel</li>
<li><strong>Analogous</strong> color schemes are formed from colors adjacent on the color wheel</li>
<li><strong>Complementary</strong> color schemes are formed from colors on opposite ends of the color wheel</li>
<li><strong>Triadic</strong> color schemes are formed by choosing colors spaced equally around the color wheel</li>
<li><strong>Tetradic</strong> color schemes are formed by choosing colors at the 4 corners of a rectangle inscribed on the color wheel</li>
<li><strong>Split Complementary</strong> color schemes are a combination of analogous and complementary schemes. One of the two complements is chosen and it&#8217;s analogous colors are included in your scheme</li>
<li><strong>Neutral</strong> color schemes include colors not found on the color wheel, namely various tones of gray and brown</li>
<li><strong>Accented Neutral</strong> color schemes are neutral color schemes with colors from the color wheel used as accents</li>
</ul>
<p>The same way individual colors convey meaning, <a rel="external nofollow" href="http://www.vanseodesign.com/web-design/color-theory/"><strong>the way they are combined conveys meaning</strong></a>. Again keep in mind that the associations in the table below are culturally formed and may or may not apply to your particular audience.</p>
<table class="post_color-meaning" cellspacing="0">
<tr>
<th width="35%">Color Scheme</th>
<th>Associations</th>
</tr>
<tr>
<td>Monochromatic</td>
<td>clean, elegant, soothing, unified, harmonious, can become monotonous, mix your monochromatic tones with pure white and/or pure black</td>
</tr>
<tr>
<td>Complementary</td>
<td>dramatic, intense, eye-catching, vibrant, can be jarring, colors can vibrate, typically bad for text</td>
</tr>
<tr>
<td>Analogous</td>
<td>found in nature, harmonious, pleasing to the eye, versatile</td>
</tr>
<tr>
<td>Triadic</td>
<td>strong visual, harmony, richness of color, can be vibrant, stability, balances, dynamic, can become garish</td>
</tr>
<tr>
<td>Split Complementary</td>
<td>high contrast, less tension than complementary color schemes, hard to harmonize, good choice for beginners, difficult to mess up, variety, less vibrant and attention grabbing</td>
</tr>
<tr>
<td>Tetradic</td>
<td>can be hard to harmonize, may look unbalanced, make for a rich color scheme, lots of variation, more varied than split complementary color schemes,  less vibrant than split complementary color schemes</td>
</tr>
</table>
<div class="newpost" style="padding-left:40px;">
<object id="_ds_25349710" name="_ds_25349710" width="560" height="400" type="application/x-shockwave-flash" data="http://viewer.docstoc.com/"><param name="FlashVars" value="doc_id=25349710&#038;mem_id=2799070&#038;showrelated=1&#038;showotherdocs=1&#038;doc_type=pdf&#038;allowdownload=1" /><param name="movie" value="http://viewer.docstoc.com/"/><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /></object><br /><font size="1">- <a href="http://www.docstoc.com/docs/25349710/Importance-of-color-for-online-sales">Importance of color for online sales</a></font>
</div>
<p><br clear="all"/></p>
<h1><span>A Few More Thoughts About Color</span></h1>
<p>We all have past associations with color and tend to be drawn to those colors in the present. While the tables above associated meanings with individual colors and color schemes, keep in mind that each of us brings our own associations to color based on previous experience.</p>
<p>As important as color is, you still want to make sure your design works in the absence of color. Many people have color disabilities and won&#8217;t be able to clearly distinguish between some colors. Don&#8217;t let color be your only visual clue. You want to use value and intensity as well. Some people might find it easier to distinguish a dark red from a light red than they will a light red from a light green. You can run your designs through a tool like <a href="http://graybit.com/main.php"><strong>Graybit</strong></a> to see what your design looks like in grayscale.</p>
<p>Too much color can be distracting and not enough color can be uninteresting. You want to vary your colors without overdoing it. Usually 3 &#8211; 5 different colors is a good balance.</p>
<div class="newpost" style="padding-left:40px;">
<img src="http://www.instantshift.com/wp-content/uploads/2010/05/wcmobyd-05.jpg" alt="instantShift - Why Color Can Make or Break Your Design" title="instantShift - Why Color Can Make or Break Your Design" width="560" class="alignnone size-full top_m" />
</div>
<p><br clear="all"/></p>
<p>Create a hierarchy of color. One color can be dominate, another color or two can be subordinate to the dominant color, and the final color or two can be used as accents to add splashes of color where contrast is desired. Contrasting colors attracting attention and repeating colors imply similarity between design elements.</p>
<p>Color can also be used to organize information by creating hierarchies and dividing one group of elements from another.</p>
<p>Color plays an important part in brand and identity. If you can maintain a consistent color scheme across marketing media, your color scheme may be identified with your <a rel="external nofollow" href="http://www.smashingmagazine.com/2009/01/28/colors-in-corporate-branding-and-design/"><strong>corporate brand</strong></a>.</p>
<p>You can create depth in your designs through control of warm and cool colors. Warmer colors tend to move into the foreground and cooler colors recede toward the background. Darker colors are usually seen first and carry more visual weight than lighter colors.</p>
<p><br clear="all"/></p>
<h1><span>Some Colorful Examples With Good Color Schemes</span></h1>
<div class="newpost" style="padding-left:40px;">
<h4><span><u>Cellar-app</u></span></h4>
<p><a rel="external nofollow" href="http://cellar-app.com/"><img src="http://www.instantshift.com/wp-content/uploads/2010/05/wcmobyd-s-01.jpg" alt="instantShift - Why Color Can Make or Break Your Design" title="instantShift - Why Color Can Make or Break Your Design" width="560" class="alignnone size-full top_m" /></a><br />
<br clear="all"/>
<p>The dominant color of the Cellar design is brown. Given the site is for an app to display what wines you currently have in your wine cellar brown is a good choice. It&#8217;s the color of the earth from which grapes grow. The color scheme here is monochromatic, shades of brown with white and gray used as accent colors. It might have been interesting to see how green and purple (the color of grapes) would have worked as accent colors.</p>
<p><a class="comments_l" rel="external nofollow" href="http://cellar-app.com/">Official Link</a><br /><br clear="all"/></p>
<h4><span><u>Aztrolab</u></span></h4>
<p><a rel="external nofollow" href="http://www.aztrolab.com/main.html"><img src="http://www.instantshift.com/wp-content/uploads/2010/05/wcmobyd-s-02.jpg" alt="instantShift - Why Color Can Make or Break Your Design" title="instantShift - Why Color Can Make or Break Your Design" width="560" class="alignnone size-full top_m" /></a><br />
<br clear="all"/>
<p>Aztrolab uses two colors from triadic color scheme, pink and light blue. The third color in the triad (a golden yellow) is used sparingly in the navigational links. White and black are further used as accent colors. Notice the strong contrast between the pink and blue. Each stands our well against the other. Even with the contrast the colors harmonize well together, one of the strengths of a triadic scheme.</p>
<p><a class="comments_l" rel="external nofollow" href="http://www.aztrolab.com/main.html">Official Link</a><br /><br clear="all"/></p>
<h4><span><u>Enviramedia</u></span></h4>
<p><a rel="external nofollow" href="http://enviramedia.com/"><img src="http://www.instantshift.com/wp-content/uploads/2010/05/wcmobyd-s-03.jpg" alt="instantShift - Why Color Can Make or Break Your Design" title="instantShift - Why Color Can Make or Break Your Design" width="560" class="alignnone size-full top_m" /></a><br />
<br clear="all"/>
<p>Envira Media pulls 3 colors from a tetradic color scheme, blue, green, and brown. The site has an environmental focus and so these natural colors fit well with the overall message. The missing color from the tetradic is purple, which might not have worked well here, though might have been interesting as an accent. Instead accent colors are white, black, and different tones of the colors from the scheme.</p>
<p><a class="comments_l" rel="external nofollow" href="http://enviramedia.com/">Official Link</a><br /><br clear="all"/></p>
<h4><span><u>Floridaflourish</u></span></h4>
<p><a rel="external nofollow" href="http://floridaflourish.com/"><img src="http://www.instantshift.com/wp-content/uploads/2010/05/wcmobyd-s-04.jpg" alt="instantShift - Why Color Can Make or Break Your Design" title="instantShift - Why Color Can Make or Break Your Design" width="560" class="alignnone size-full top_m" /></a><br />
<br clear="all"/>
<p>Flourish Web Design uses a metaphor of planting and growing to promote it&#8217;s design services. As with Enviro Media above the site uses colors found commonly in nature. The colors appear to be variations of colors you would find in a tetradic color scheme. Notice that red (the strongest color here) is mainly used for accent and is generally used sparingly throughout the site.</p>
<p><a class="comments_l" rel="external nofollow" href="http://floridaflourish.com/">Official Link</a><br /><br clear="all"/></p>
<h4><span><u>Brianjeremy</u></span></h4>
<p><a rel="external nofollow" href="http://www.brianjeremy.com/"><img src="http://www.instantshift.com/wp-content/uploads/2010/05/wcmobyd-s-05.jpg" alt="instantShift - Why Color Can Make or Break Your Design" title="instantShift - Why Color Can Make or Break Your Design" width="560" class="alignnone size-full top_m" /></a><br />
<br clear="all"/>
<p>Brian Jeremy also makes use of a tetradic color scheme, though what&#8217;s more interesting here is that the dominant colors are neutral grays and blacks. Despite these being the dominant colors, the design overall appears very bright and colorful. A wide variety of colors are used as accents and the overall effect is to leave the impression of a colorful site.</p>
<p><a class="comments_l" rel="external nofollow" href="http://www.brianjeremy.com/">Official Link</a><br /><br clear="all"/></p>
<h4><span><u>Foodtease</u></span></h4>
<p><a rel="external nofollow" href="http://foodtease.com/"><img src="http://www.instantshift.com/wp-content/uploads/2010/05/wcmobyd-s-06.jpg" alt="instantShift - Why Color Can Make or Break Your Design" title="instantShift - Why Color Can Make or Break Your Design" width="560" class="alignnone size-full top_m" /></a><br />
<br clear="all"/>
<p>As with the Brian Jeremy site, Food Tease uses white as the dominant color with pink and yellow (pulled from a tetradic scheme) being used as secondary colors. Images are used liberally throughout the site adding additional colors. Again the overall effect is to see a colorful site, even thought the dominant color is white.</p>
<p><a class="comments_l" rel="external nofollow" href="http://foodtease.com/">Official Link</a><br /><br clear="all"/></p>
<h4><span><u>Mint</u></span></h4>
<p><a rel="external nofollow" href="http://www.mint.com/"><img src="http://www.instantshift.com/wp-content/uploads/2010/05/wcmobyd-s-07.jpg" alt="instantShift - Why Color Can Make or Break Your Design" title="instantShift - Why Color Can Make or Break Your Design" width="560" class="alignnone size-full top_m" /></a><br />
<br clear="all"/>
<p>When you hear the word mint, what color comes to mind? Green most likely, hence the the choice of green as dominant on the Mint site. The color scheme is mostly monochromatic with orange used as a contrasting color to attract attention. Notice how orange is mainly used as the color behind calls-to-action.</p>
<p><a class="comments_l" rel="external nofollow" href="http://www.mint.com/">Official Link</a><br /><br clear="all"/></p>
<h4><span><u>Frankprendergast</u></span></h4>
<p><a rel="external nofollow" href="http://frankprendergast.ie/"><img src="http://www.instantshift.com/wp-content/uploads/2010/05/wcmobyd-s-08.jpg" alt="instantShift - Why Color Can Make or Break Your Design" title="instantShift - Why Color Can Make or Break Your Design" width="560" class="alignnone size-full top_m" /></a><br />
<br clear="all"/>
<p>Frank Pendergrast uses black and yellow as dominant colors. A red (analogous to yellow) is chosen as an accent color for headings. Blue, a complimentary color to yellow is used for links. Again notice how just a few colors, some used only as accents, can add up to a colorful site.</p>
<p><a class="comments_l" rel="external nofollow" href="http://frankprendergast.ie/">Official Link</a><br /><br clear="all"/></p>
<h4><span><u>Wedesignwise</u></span></h4>
<p><a rel="external nofollow" href="http://wedesignwise.com/"><img src="http://www.instantshift.com/wp-content/uploads/2010/05/wcmobyd-s-09.jpg" alt="instantShift - Why Color Can Make or Break Your Design" title="instantShift - Why Color Can Make or Break Your Design" width="560" class="alignnone size-full top_m" /></a><br />
<br clear="all"/>
<p>Designwise uses dark gray as the dominant color with shades of red as a secondary color. A light tan is also used as a secondary color. As with some of the other examples, notice that the design doesn&#8217;t seem overly dark despite the dark dominant color. Splashes of red and tan go a long way toward creating a harmonic color scheme that works well and makes the design memorable.</p>
<p><a class="comments_l" rel="external nofollow" href="http://wedesignwise.com/">Official Link</a><br /><br clear="all"/>
</div>
<p><br clear="all"/></p>
<h1><span>Summary</span></h1>
<p>Color is important, too important to ignore or tack on to the end of a design. You want to <a rel="external nofollow" href="http://www.techwyse.com/blog/website-design/importance-of-color-selection-in-website-design/"><strong>plan a color scheme</strong></a> early in your design with the understanding of what meaning different colors and schemes might convey to your audience. Color helps us process and store information more efficiently than black and white and as a result we remember the information better.</p>
<p>Remember that the meaning of color us culturally biased. Before determining what a given color will mean to your viewers make sure you understand who your viewers are and as much as you can about their culture. The same color color can mean very different things to two different people.</p>
<p>Again consider this post an introduction to color or a waypoint on your color learning journey. Read other articles and books on color and experiment. One of the best ways you can learn more about color is through observing how others use color and identifying how their choices made you feel. Take what you observe and try applying it to your own designs.</p>
<p><br clear="all"/></p>
<h1><span>Image Credits</span></h1>
<ul>
<li><a rel="external nofollow" href="http://secretsalive.deviantart.com/art/Rainbow-63760834"><strong>Rainbow | SecretsAlive</strong></a></li>
<li><a rel="external nofollow" href="http://www.flickr.com/photos/49457106@N00/264806933/"><strong>065D12069 | Paulo  Alegria</strong></a></li>
</ul>
<h1><span>Find Something Missing?</span></h1>
<p><strong>While writing this article, it&#8217;s always a possibility that we missed some other great information or resources about color theory in design. Feel free to share it with us.</strong></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.instantshift.com/2010/05/21/why-colors-can-make-or-break-your-design/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
		<item>
		<title>47 CSS Tips &amp; Tricks To Take Your Site To The Next Level</title>
		<link>http://www.instantshift.com/2010/03/15/47-css-tips-tricks-to-take-your-site-to-the-next-level/</link>
		<comments>http://www.instantshift.com/2010/03/15/47-css-tips-tricks-to-take-your-site-to-the-next-level/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 14:39:04 +0000</pubDate>
		<dc:creator>Steven Bradley</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[advice]]></category>
		<category><![CDATA[CSS techniques]]></category>
		<category><![CDATA[css tips]]></category>
		<category><![CDATA[css tricks]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[markup]]></category>
		<category><![CDATA[techniques]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tricks]]></category>
		<category><![CDATA[tricks collection]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.instantshift.com/?p=2441</guid>
		<description><![CDATA[CSS is a wonderful language for presenting web pages. It&#8217;s not too difficult to learn, though like most things, it does have a learning curve. Where many people seem to get tripped up is in specific solutions to specific problems. Fortunately there&#8217;s a good chance that someone before you has already had the same problem [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin: 4px 0px 10px 20px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.instantshift.com%2F2010%2F03%2F15%2F47-css-tips-tricks-to-take-your-site-to-the-next-level%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.instantshift.com%2F2010%2F03%2F15%2F47-css-tips-tricks-to-take-your-site-to-the-next-level%2F" height="61" width="51" /></a></div><p><strong>CSS</strong> is a wonderful language for presenting web pages. It&#8217;s not too difficult to learn, though like most things, it does have a learning curve. Where many people seem to get tripped up is in specific solutions to specific problems. Fortunately there&#8217;s a good chance that someone before you has already had the same problem and even better has found a solution.</p>
<p>Here are 47 of those solutions. <strong>47 CSS Tips, Tricks, and Techniques to add to your CSS toolbox</strong>. Some you may be familiar with while others may be new to you. The tips below span from beginner to more advanced CSS code. Hopefully you&#8217;ll find a few techniques that will be both new and useful to you and perhaps some will find their way into your next project.<br />
<span id="more-2441"></span><br />
<br clear="all"/></p>
<p>For those, who don’t know what is <strong>CSS</strong>? And what it can do? Than CSS (Cascading Style Sheets) is a style sheet language used to describe the presentation semantics (that is, the look and formatting) of a document written in a markup language. Its most common application is to style web pages  written in HTML  and XHTML, but the language can be applied to any kind of XML document, including SVG and XUL.</p>
<p>Please follow the link below for detail introduction.</p>
<ul>
<li><a target="_blank" rel="external nofollow" href="http://en.wikipedia.org/wiki/Cascading_Style_Sheets"><strong>CSS | From Wikipedia, the free encyclopedia</strong></a></li>
<li><a target="_blank" rel="external nofollow" href="http://www.w3.org/Style/CSS/"><strong>CSS | From W3C (World Wide Web Consortium)</strong></a></li>
</ul>
<p>CSS always plays a vital role in web design and it always gives you opportunity to make your website user friendly. Unfortunately, there is no well defined way for you to find out about visitors thinking towards your blog or its design. It’s always essential to play safe and give others what they like using creative solutions. CSS isn’t always easy to deal with. Over the last many years web-designers and developers have written many articles about CSS and developed many useful tips and techniques, which can save you a lot of time – of course, if you are able to find them in time. That is the only reason why we created this article to give you as many as CSS tricks in a single place.</p>
<p><strong>You may be interested in the following tips and tricks related articles as well.</strong></p>
<ul>
<li><a target="_blank" href="http://www.instantshift.com/2009/06/15/22-mixed-quality-wordpress-hacks/"><strong>22 Mixed  Exceptional WordPress Hacks</strong></a></li>
<li><a target="_blank" href="http://www.instantshift.com/2009/05/25/10-twitter-hacks-for-your-wordpress-blog/"><strong>10 Twitter Hacks For Your WordPress Blog</strong></a></li>
<li><a target="_blank" href="http://www.instantshift.com/2009/02/08/30-most-wanted-wordpress-comments-page-hacks/"><strong>30 Most Wanted WordPress Comments Page Hacks</strong></a></li>
<li><a target="_blank" href="http://www.instantshift.com/2009/03/10/11-tips-to-reduce-server-load-and-save-bandwidth/"><strong>11 Tips to Reduce Server Load and Save Bandwidth</strong></a></li>
<li><a target="_blank" href="http://www.instantshift.com/2009/02/14/how-to-increase-web-traffic-through-search-engines/"><strong>How to Increase Web Traffic through Search Engines!</strong></a></li>
<li><a target="_blank" href="http://www.instantshift.com/2009/02/24/21-reasons-why-readers-don%e2%80%99t-like-your-blog/"><strong>21 Reasons Why Readers Don’t Like Your Blog</strong></a></li>
</ul>
<p>Please feel free to join us and you are always welcome to share your thoughts even if you have more reference links related to other tips and tricks that our readers may like.</p>
<p></p>
<p>Don’t forget to <a rel="external nofollow" href="http://feeds2.feedburner.com/ishift"><img src="http://www.instantshift.com/images/rss.png" alt="Subscribe to our RSS-feed" style="float:none;padding:0;margin:0;border:0;" align="absmiddle" /> <strong>subscribe to our RSS-feed</strong></a> and <a rel="external nofollow" href="http://twitter.com/instantshift"><img src="http://www.instantshift.com/images/twitter.png" alt="Follow us on Twitter" style="float:none;padding:0;margin:0;border:0;" align="absmiddle" /> <strong>follow us on Twitter</strong></a> &mdash; for recent updates.</p>
<p><div style="padding-left:150px;"><script type="text/javascript">_bsap.drop('18455f93e4fb797679148ac419c87226', 1243233);</script></div>
<br />
<br clear="all"/></p>
<div class="newpost">
<h1><span>CSS Tips, Tricks, and Techniques for Your Website</span></h1>
<p>If you&#8217;re working with WordPress then of course, the <a target="_blank" rel="external nofollow" href="http://codex.wordpress.org/"><strong>WordPress Codex</strong></a> is always the best place to learn about WordPress and its tweaks with CSS. However, if you are into web designing business than there are thousands of resources available for CSS tips. But unfortunately, it&#8217;s too much for a simple user. This the only reason we compiled this fairly comprehensive list of the <strong>47 Exceptional CSS Tips, Tricks, and Techniques</strong> to unleash the power of your favorite mark-up language.</p>
<p>Most of these tips what follows will work cross-browser. Where there are differences between browsers alternate solutions have been provided if they exist. With that said let&#8217;s dive in.</p>
<div class="newpost" style="padding-left:20px;">
<h4><span>01. <u>Horizontal Centering</u></span></h4>
<p>To <a target="_blank" rel="external nofollow" href="http://www.vanseodesign.com/css/centering-with-css/"><strong>horizontally center block level elements in CSS</strong></a> you need three things. You need to explicitly set a width on the element, set the left and right margins to auto, and include a <a target="_blank" rel="external nofollow" href="http://www.alistapart.com/stories/doctype/"><strong>proper doctype</strong></a> to keep older versions of IE from going into quirks mode.</p>
<pre name="code" class="css">
div#page {width: 960px; margin: 0 auto}
</pre>
<p>The above will center the div with an id of page inside it&#8217;s parent container.</p>
<p><br clear="all"/></p>
<h4><span>02. <u>Vertical Centering Text with Line-Height</u></span></h4>
<p>If you want to vertically center text within a containing block who&#8217;s height is fixed, simply set the line-height of the text to be the same as the height of the containing block</p>
<p>The HTML:</p>
<pre name="code" class="html">
<div id="container">some text here</div>
</pre>
<p>The CSS:</p>
<pre name="code" class="css">
div#container {height: 35px; line-height: 35px}
</pre>
<p><br clear="all"/></p>
<h4><span>03. <u>Vertical Centering Block Level Elements</u></span></h4>
<p>Positioning can be used to <a target="_blank" rel="external nofollow" href="http://blog.themeforest.net/tutorials/vertical-centering-with-css/"><strong>vertically center block level elements</strong></a>.</p>
<p>The HTML:</p>
<pre name="code" class="html">
<div id="content">your content here</div>
</pre>
<p>The CSS:</p>
<pre name="code" class="css">
div#content {position: absolute; top: 50%; height: 500px; margin-top: -250px}
</pre>
<p>The top left corner of the div will be positioned 50% from the top. Since we want the center of the div to be positioned 50% from the top you need to set a negative top margin equal to half the height of the div.</p>
<p>This same trick works for horizontal centering as well. Change top to left and margin-top to margin-left and set the negative margin to be half of the width of the element.</p>
<pre name="code" class="css">
div#content {position: absolute; top: 50%; left:50%; width:800px; height: 500px; margin-left: -400px;  margin-top: -250px}
</pre>
<p>The above CSS will center the element both vertically and horizontally.</p>
<p><br clear="all"/></p>
<h4><span>04. <u>Fluid Images</u></span></h4>
<p>To create <a target="_blank" rel="external nofollow" href="http://unstoppablerobotninja.com/entry/fluid-images/"><strong>fluid images</strong></a> set a max-width on the images to be 100%</p>
<pre name="code" class="css">
img {max-width: 100%}
</pre>
<p>Unfortunately IE doesn&#8217;t do max-width. However IE treats the width property as though it was max-width. For IE use a <a target="_blank" rel="external nofollow" href="http://www.quirksmode.org/css/condcom.html"><strong>conditional comment</strong></a> and set</p>
<pre name="code" class="css">
img {width: 100%}
</pre>
<p>For a more details about creating fluid images in older versions of IE click the link above.</p>
<p><br clear="all"/></p>
<h4><span>05. <u>3D Buttons with CSS Only</u></span></h4>
<p><a target="_blank" rel="external nofollow" href="http://www.vanseodesign.com/css/css-navigation-buttons/"><strong>3D CSS buttons</strong></a> are easy to create. The trick is to give your elements borders with different colors. Lighter where the light source shines and darker where it doesn&#8217;t.</p>
<pre name="code" class="css">
div#button {background: #888; border: 1px solid; border-color: #999 #777 #777 #999 }
</pre>
<p>The CSS above will create a button with the light source at the upper left. Usually one or two shades of color change is all that&#8217;s needed, but you can experiment for different effects.</p>
<p><br clear="all"/></p>
<h4><span>06. <u>CSS Font Shorthand</u></span></h4>
<p>When using <a target="_blank" rel="external nofollow" href="http://www.impressivewebs.com/a-primer-on-the-css-font-shorthand-property/"><strong>shorthand on the font property</strong></a> you need to specify each property in the following order</p>
<pre name="code" class="css">
body { font: font-style font-variant font-weight font-size line-height font-family; }
</pre>
<p>You don&#8217;t need to include every property, but know that for any you don&#8217;t include that property will be reset to it&#8217;s default.</p>
<p><br clear="all"/></p>
<h4><span>07. <u>Setting Multiple Classes on an HTML Element</u></span></h4>
<p><img src="http://www.instantshift.com/wp-content/uploads/2010/03/ctatttystnl-01.jpg" alt="instantShift - CSS Tips and Tricks" title="instantShift - CSS Tips and Tricks" width="560" height="210" class="alignnone size-full top_m" /><br clear="all"/></p>
<p>Easy and easy to forget the proper syntax. If you want to set multiple classes on an html element it should look like:</p>
<pre name="code" class="html">
<div class="class-1 class-2 class-3">
</div>
</pre>
<p>with all class names inside the same set of double quotes with a space between each. The CSS specificity is controlled by the order of the classes in your CSS file. If your CSS has:</p>
<pre name="code" class="css">
class-2 {color: blue}
class-3 {color: green}
class-1 {color: red}
</pre>
<p>then text inside the div will be red as class-1 is the last declared in the CSS. The order the classes appear in the html is irrelevant.</p>
<p><br clear="all"/></p>
<h4><span>08. <u>Rounded Corners</u></span></h4>
<p><img src="http://www.instantshift.com/wp-content/uploads/2010/03/ctatttystnl-02.jpg" alt="instantShift - CSS Tips and Tricks" title="instantShift - CSS Tips and Tricks" width="560" height="210" class="alignnone size-full top_m" /><br clear="all"/></p>
<p>When CSS3 is fully supported across browsers rounded corners will be as simple as:</p>
<pre name="code" class="css">
.element {border-radius: 5px}
</pre>
<p>which will set a 5px radius on all 4 corners. For now we need some browser specific CSS combined with a little JavaScript to make this work in all browsers.</p>
<p>In Safari, Chrome, and other webkit browsers we use <code>-webkit-border-radius</code> and in Firefox and other Mozilla based browsers we use <code>-moz-border-radius</code>.</p>
<pre name="code" class="css">
.element {
	border-radius: 5px
	-webkit-border-radius: 5px
	-moz-border-radius: 5px
}
</pre>
<p>Webkit and Mozilla use different syntax when specifying one corner.</p>
<pre name="code" class="css">
.element {
	border-top-left-radius: 5px
	-webkit-border-top-left-radius: 5px
	-moz-border-radius-top-left
}
</pre>
<p>For non Webkit and Mozilla browsers a little <a target="_blank" rel="external nofollow" href="http://www.malsup.com/jquery/corner/"><strong>jQuery plugin</strong></a> will mimic the border-radius property.</p>
<pre name="code" class="css">
$(".element").corner("5px");
</pre>
<p>The jQuery corner plugin allows for more than setting the radius of the corner. You can also set the corner to show as a number of other patterns.</p>
<h4><span>09. <u>Link Style Order</u></span></h4>
<p>When setting CSS on the different link states, the link states need to be set in a particular order</p>
<pre name="code" class="css">
a:link
a:visited
a:hover
a:active
</pre>
<p>An easy way to remember is LoVe HAte. LVHA &#8211; Link, Visited, Hover, Active.</p>
<p><br clear="all"/></p>
<h4><span>10. <u>Clearing and Containing Floats</u></span></h4>
<p>There are two basic methods to clearing <a target="_blank" rel="external nofollow" href="http://www.vanseodesign.com/css/understanding-css-floats/"><strong>CSS floats</strong></a>. The first is to use the clear property</p>
<pre name="code" class="html">
<div id="wrapper">
<div id="header"></div>
<div id="content"></div>
<div id="sidebar"></div>
<div id="footer"></div>
</div>
</pre>
<p>Say in the above html you have your content and sidebar div floated to the left and you want to ensure the footer div sits below both. You would use the clear property</p>
<pre name="code" class="css">
#content {float: left}
#sidebar {float: left}
#footer {clear: both}
</pre>
<p>You could also use clear: left or clear: right depending on which way the content and sidebar are floated.</p>
<p>If on the other hand your html was:</p>
<pre name="code" class="html">
<div id="header">
	<img id="logo" src="" alt="" />
<p id="tagline">

</div>
</pre>
<p>and both the logo and tagline are floated, your header div will collapse and show as having 0 height. You can either add an empty <code>div</code> (<code>&lt;div class=&#34;clear&#34;&gt;&lt;/div&gt;</code>) and then clear the empty div as above or you can use the overflow property on the header div to contain the floated elements</p>
<pre name="code" class="css">
div#header {overflow: hidden}
</pre>
<p>The above will keep the header div from collapsing even if everything inside has been floated.</p>
<p><br clear="all"/></p>
<h4><span>11. <u>Conditional Comments</u></span></h4>
<p><img src="http://www.instantshift.com/wp-content/uploads/2010/03/ctatttystnl-03.jpg" alt="instantShift - CSS Tips and Tricks" title="instantShift - CSS Tips and Tricks" width="560" height="210" class="alignnone size-full top_m" /><br clear="all"/></p>
<p><a target="_blank" rel="external nofollow" href="http://www.vanseodesign.com/css/conditional-comments/"><strong>Conditional comments</strong></a> are an ideal way to target IE browsers only, since IE is often the browser that won&#8217;t cooperate. The basic form of a conditional comments is:</p>
<pre name="code" class="html">
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="ie-stylesheet.css" />
< ![endif]-->
</pre>
<p>The above will load an IE specific stylesheet only when the browser viewing the page is Internet Explorer. You can further target specific versions of IE.</p>
<pre name="code" class="html">
<!--[if IE 6]> - targets IE6 only -->
<!--[if gt IE 6]> - targets IE7 and above -->
<!--[if lt IE 6]> - targets IE5.5 and below -->
<!--[if gte IE 6]> - targets IE6 and above -->
<!--[if lte IE 6]> - targets IE6 and below -->
</pre>
<p>You can specify any version of Internet Explorer and through a combination of conditional comments you can server different CSS styles to different versions of IE.</p>
<p><br clear="all"/></p>
<h4><span>12. <u>HTML Hack for IE</u></span></h4>
<p>Another way to target IE specifically is to use the <a target="_blank" rel="external nofollow" href="http://css-discuss.incutio.com/?page=StarHtmlHack"><strong>HTML * hack</strong></a>. Internet Explorer allows you to use something other than the html element as the root of your document. By placing an * in front of html in your CSS (<code>*html</code>) you can target IE only as other browsers will ignore the declaration.</p>
<pre name="code" class="css">
div#content {width: 580px}
* html body div#content {width: 600px}
</pre>
<p>IE will use 600px for the width of the content div, while other browsers use 580px.</p>
<p>The above works for IE6 and below. When not in standards mode, but in quirks mode this will work on IE7 as well. You can also target IE7 (in quirks mode) specifically with</p>
<pre name="code" class="css">
*+html body div#content {width: 620px}
</pre>
<p><br clear="all"/></p>
<h4><span>13. <u>CSS Specificity</u></span></h4>
<p>When two or more CSS selectors are sending conflicting instructions to a single html element, a choice must be made as to which styles to apply. This is done through <a target="_blank" rel="external nofollow" href="http://www.vanseodesign.com/css/css-specificity-inheritance-cascaade/"><strong>CSS specificity calculations</strong></a> and is expressed in the form of (a.b,c,d)</p>
<pre name="code" class="css">
Element, Pseudo Element: d = 1 – (0,0,0,1)
Class, Pseudo class, Attribute: c = 1 – (0,0,1,0)
Id: b = 1 – (0,1,0,0)
Inline Style: a = 1 – (1,0,0,0)
</pre>
<p>In the following examples the specificity increases as you move down</p>
<pre name="code" class="css">
p: 1 element – (0,0,0,1)
div: 1 element – (0,0,0,1)
#sidebar: 1 id – (0,1,0,0)
div#sidebar: 1 element, 1 id – (0,1,0,1)
div#sidebar p: 2 elements, 1 id – (0,1,0,2)
div#sidebar p.bio: 2 elements, 1 class, 1 id – (0,1,1,2)
</pre>
<p><br clear="all"/></p>
<h4><span>14. <u>min-height fix for IE</u></span></h4>
<p>Sadly IE still doesn&#8217;t comply with <code>min-height</code>. However it does treat the height property as though it was <code>min-height</code>. Knowing that, we can sort of get <code>min-height</code> working in Internet Explorer.</p>
<pre name="code" class="css">
.element {
	min-height: 500px
	height: auto !important
	height: 500px
}
</pre>
<p>The first line above sets the min-height for non-IE browsers. The last line essentially sets min-height in IE as IE will treat height as we expect it to treat min-height. The middle line above is to ensure that non-IE browsers don&#8217;t use 500px as the height of the element. Using <code>!important</code> will override the height declaration below in all browsers, except IE.</p>
<p>Another way to target IE only is to use _height. Only IE6 will treat <code>_height</code> as height. All other browsers will ignore it. You have to specify <code>_height</code> after any height declaration as IE will use whichever comes last.</p>
<pre name="code" class="css">
.element {
	min-height: 500px
	_height: 500px
}
</pre>
<p><br clear="all"/></p>
<h4><span>15. <u>Base Font-Size</u></span></h4>
<p>Using fluid measurements like <code>'em' or %</code> on your fonts is a great way to help create more fluid designs. It can be a pain though to calculate &#8216;em&#8217;s for every different element. A simple trick is to set your base font to be the equivalent of 10px. Since the default font-size of browsers is 16px you can set a base <code>font-size</code> with the following:</p>
<pre name="code" class="css">
body {font-size:62.5%}

10/16 = 62.5%
</pre>
<p>Now if you want your h1 to be 24 px the calculation is much easier</p>
<pre name="code" class="css">
h1 {font-size: 2.4 em}
</pre>
<p><br clear="all"/></p>
<h4><span>16. <u>100% Height</u></span></h4>
<p><a target="_blank" rel="external nofollow" href="http://www.dave-woods.co.uk/?p=144"><strong>100% height</strong></a> is one of those things CSS doesn&#8217;t do so easily. When you specify an element to have a height of 100%, the 100% refers to the containing element&#8217;s height. The containing element would then need to be 100% the height of its containing element and so on. The trick is to set the height of the outermost elements to be 100%</p>
<pre name="code" class="css">
html, body {height: 100%}
</pre>
<p>We need to add one more thing. If your content exceeds 100% height then it will overflow its container. To correct this we&#8217;d need to set <code>min-height</code> on the content&#8217;s container</p>
<pre name="code" class="css">
#content {min-height: 100%}
</pre>
<p>You can use one of the methods above for serving <code>min-height</code> to IE.</p>
<p><br clear="all"/></p>
<h4><span>17. <u>CSS Drop Caps</u></span></h4>
<p>Drop Caps can easily be styled by taking advantage of the CSS pseudo-element <code>:first-letter</code>.</p>
<pre name="code" class="css">
p:first-letter {
	display: block;
	float: left;
	margin: 5px 5px 0 0;
	color: red
	font-size: 1.4em;
	background: #ddd;
	font-family: Helvetica;
}
</pre>
<p>This should work in all modern browsers. CSS3 introduces the <a href="https://developer.mozilla.org/En/CSS/::first-letter"><strong>::first-letter notation</strong></a> to distinguish between pseudo-elements and pseudo-classes, but this new notation is not yet compatible with IE. For now use the single <code>:first-letter</code> notation.</p>
<p><br clear="all"/></p>
<h4><span>18. <u>Remove Dotted Outline on Links</u></span></h4>
<p>Easy with the CSS outline property</p>
<pre name="code" class="css">
a {outline: none} or a {outline: 0}
</pre>
<p>The outline is useful for accessibility so think twice before turning it off completely. You may only want to set it for one of the specific link states mentioned above.</p>
<p><br clear="all"/></p>
<h4><span>19. <u>Text-transform</u></span></h4>
<p>Through the <a target="_blank" rel="external nofollow" href="http://www.w3schools.com/Css/pr_text_text-transform.asp"><strong>CSS text-transform property</strong></a> you can make sure certain blocks of text are either uppercase, lowercase, or only the first letter of each word is uppercase</p>
<pre name="code" class="css">
p {text-transform: uppercase}
p {text-transform: lowercase}
p {text-transform: capitalize}
</pre>
<p><br clear="all"/></p>
<h4><span>20. <u>Font Variant</u></span></h4>
<p>Another trick with type is to use the font-variant property to create small caps</p>
<pre name="code" class="css">
p {font-variant: small-caps}
</pre>
<p>If the font you&#8217;re working with doesn&#8217;t have a small caps variation, know you&#8217;ll be creating pseudo small caps, which may or may not look as good as you&#8217;d like.</p>
<p><br clear="all"/></p>
<h4><span>21. <u>Removing the Border from Image Links</u></span></h4>
<p>By default any image that is wrapped in a link will have a border around the image (similar to the way text is underlined). Removing the border is simple</p>
<pre name="code" class="css">
a image {border: none} or a image {border: 0}
</pre>
<p>Since I never want to see the border around image links I usually set the above on every site I develop.</p>
<p><br clear="all"/></p>
<h4><span>22. <u>Using a CSS Reset for Cross-Browser Compatibility</u></span></h4>
<p><img src="http://www.instantshift.com/wp-content/uploads/2010/03/ctatttystnl-04.jpg" alt="instantShift - CSS Tips and Tricks" title="instantShift - CSS Tips and Tricks" width="560" height="210" class="alignnone size-full top_m" /><br clear="all"/></p>
<p>One of the issues in <a target="_blank" rel="external nofollow" href="http://www.vanseodesign.com/css/cross-browser-css/"><strong>cross-browser web development</strong></a> is that different browsers use different default values for various CSS properties. By explicitly setting a property like margin to be 0 for certain html elements we can assure that the margin will be 0 on that element in all browsers.</p>
<p>The best way to do that is to use a CSS reset file like the ones developed by <a target="_blank" rel="external nofollow" href="http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/"><strong>Eric Meyer</strong></a> or <a target="_blank" rel="external nofollow" href="http://developer.yahoo.com/yui/reset/"><strong>Yahoo</strong></a> or you can develop your own.</p>
<p>Using a CSS reset ensure that all browsers are on the same page so to speak.</p>
<p><br clear="all"/></p>
<h4><span>23. <u>Setting Padding on Background Images</u></span></h4>
<p>Since background images don&#8217;t create a new <a target="_blank" rel="external nofollow" href="http://www.instantshift.com/2009/11/16/css-box-model-the-foundation-for-improving-your-css/#comments"><strong>CSS box</strong></a> you can&#8217;t directly set padding on them. What you want to do is use the background-position property on the background image to create the same effect.</p>
<pre name="code" class="css">
background-position {top-value left-value}
</pre>
<p>Top values can be top, center, or bottom and Left values can be left, center, or bottom</p>
<p>Both can also take values in % or px or any other measurement. So to create 5px of padding around a background image you would use:</p>
<pre name="code" class="css">
{background-position: 5px 5px}
</pre>
<p><br clear="all"/></p>
<h4><span>24. <u>Stretching a Background Image</u></span></h4>
<p>To create a background image that can expand and contract with it&#8217;s containing element you want to create an image larger than needed, large enough to accommodate the largest possible size of the containing element. Then use the background-position property to center the background image</p>
<pre name="code" class="css">
{background-position: 50% 50%}
</pre>
<p>The above will center your background image in the containing element. The image will grow and shrink to fit the size of the containing element and always be centered. You&#8217;ll want to make sure the center of the image contains the most important part of the image since only the center is guaranteed to visibly show.</p>
<p><br clear="all"/></p>
<h4><span>25. <u>Wrap Links Around a Background Image</u></span></h4>
<p>Again since a background image doesn&#8217;t create a new <a target="_blank" rel="external nofollow" href="http://www.instantshift.com/2009/11/16/css-box-model-the-foundation-for-improving-your-css/"><strong>CSS box</strong></a> you can&#8217;t directly wrap a link around it. You can either wrap the link around the containing element or wrap the link around all the content inside the containing element.</p>
<pre name="code" class="html">
<a href="">
<div id="bkgd-image">

your content here

</div>

</a>
<div><a href="">

your content here


</a></div>
</pre>
<p>Either of the above will essentially let someone click your background image as though it were a link.</p>
<p><br clear="all"/></p>
<h4><span>26. <u>Background Images as List Bullets</u></span></h4>
<p><img src="http://www.instantshift.com/wp-content/uploads/2010/03/ctatttystnl-05.jpg" alt="instantShift - CSS Tips and Tricks" title="instantShift - CSS Tips and Tricks" width="560" height="210" class="alignnone size-full top_m" /><br clear="all"/></p>
<p>Sometimes it&#8217;s nice to be able to use an <a target="_blank" rel="external nofollow" href="http://css.maxdesign.com.au/listamatic/vertical05.htm"><strong>image as a bullet</strong></a> instead of one of the supported <code>list-style-types</code>.</p>
<pre name="code" class="css">
ul {list-style: none}
ul li {
	background-image: url("path-to-your-image");
	background-repeat: none;
	background-position: 0 0.5em;
}
</pre>
<p><br clear="all"/></p>
<h4><span>27. <u>Swap Background Images on Hover</u></span></h4>
<p>There are two very similar ways to achieve this. The key in both is to use the <code>:hover pseudo-class</code> to change either the url of the image or the position of an image sprite</p>
<pre name="code" class="css">
.element {background-image: url("path-to-an-image")}
.element:hover {background-image: url("path-to-a-different-image")}

.element {background-position: top-value left-value}
.element:hover {background-position: different-top-value different-left-value}
</pre>
<p>Unfortunately IE only accepts :hover on a link and not another element. You can use something like the <a target="_blank" rel="external nofollow" href="http://htmldog.com/articles/suckerfish/hover/"><strong>suckerfish system</strong></a> to dynamically add a class for IE and simulate the :hover behavior.</p>
<p><br clear="all"/></p>
<h4><span>28. <u>Visibility or Display?</u></span></h4>
<p>On the surface both the <a target="_blank" rel="external nofollow" href="http://www.vanseodesign.com/css/visibility-vs-display/"><strong>CSS visibility and display properties</strong></a> seem to do the same thing, hide or show an element on the page. Beneath the surface they work differently.</p>
<ul>
<li><code>{visibility: hidden}</code> &#8211; The element holds the space, but isn&#8217;t seen</li>
<li><code>{display: none}</code> &#8211; The element does not hold space. Other elements collapse to fill the space</li>
</ul>
<p>Most of the time you likely want to use <code>display: none</code>, unless your goal is to leave an empty open space on your page.</p>
<p><br clear="all"/></p>
<h4><span>29. <u>Cross-Browser Transparency</u></span></h4>
<p>Not all browsers currently support the CSS3 opacity property. However we can still make transparency work across browsers.</p>
<pre name="code" class="css">
.element {
	filter:alpha(opacity=50);
	-moz-opacity:0.5;
	-khtml-opacity: 0.5;
	opacity: 0.5;
}
</pre>
<p>From the bottom up:</p>
<p>opacity is the CSS standard and will work in current Webkit and Mozilla browsers as well as Opera</p>
<ul>
<li><code>-moz-opacity is</code> for older versions of Mozilla Browsers</li>
<li><code>-khtml-opacity</code> is for older versions of Safari and any browser using the khtml rendering engine</li>
<li><code>filter:alpha(opacity=50)</code> is for Internet Explorer</li>
</ul>
<p><br clear="all"/></p>
<h4><span>30. <u>Target IE7 (and below) and IE6 (specifically) without Conditional Comments</u></span></h4>
<p><img src="http://www.instantshift.com/wp-content/uploads/2010/03/ctatttystnl-06.jpg" alt="instantShift - CSS Tips and Tricks" title="instantShift - CSS Tips and Tricks" width="560" height="210" class="alignnone size-full top_m" /><br clear="all"/></p>
<p>We all know how difficult IE can sometimes be when it comes to CSS. However instead of cursing IE under your breath or out loud you can easily write IE specific code that other browsers will ignore. My own preference is for conditional comments, but here&#8217;s a quick trick you can use in your main CSS file. </p>
<pre name="code" class="css">
.element {
	background: red; /* modern browsers */
	*background: green; /* IE 7 and below */
	_background: blue; /* IE6 exclusively */
}
</pre>
<p>With the exception of IE, all browsers will ignore the asterisk in front of the property. Everything other than IE6 will ignore the underscore. The order of the above properties is very important due to CSS precedence rules.</p>
<p><br clear="all"/></p>
<h4><span>31. <u>nth-child</u></span></h4>
<p>The <a target="_blank" rel="external nofollow" href="http://css-tricks.com/how-nth-child-works/"><strong>nth-child</strong></a> CSS pseudo-selectors allow you to target the 3rd or 7th or nth element in a list. Another use would be to style odd and even rows in a table differently. The alternative is to add a class specifically to the list-item you want to style differently, but that&#8217;s not very flexible. The nth-child syntax looks like this:</p>
<pre name="code" class="css">
ul li:nth-child(3) {
	background: blue
}
</pre>
<p>The above would select the 3rd item in the list and give it a blue background</p>
<pre name="code" class="css">
ul li:nth-child(3n+3) {
	background: blue
}
</pre>
<p>Similarly the code above would style every 3rd list item with a blue background</p>
<p>Unfortunately no current version of IE supports it. However there is a way to <a target="_blank" rel="external nofollow" href="http://www.thebrightlines.com/2010/01/04/alternative-for-nth-of-type-and-nth-child/"><strong>simulate the 1st bit of code above for IE7 and IE8</strong></a>.</p>
<pre name="code" class="css">
ul > li:nth-child(3) is the same as ul > *:first-child + * + *
</pre>
<p>The code above will also target the 3rd element in the list in a way that IE7 and 8 understand. Not quite as useful as being able to use (3n+3) to target every 3rd list-item, but better than nothing.  Hopefully IE9 will support nth-child.</p>
<p>Another and perhaps more practical solution currently is to use jQuery, which supports all CSS3 selectors.</p>
<p><br clear="all"/></p>
<h4><span>32. <u>Basic 2-column CSS layout (fixed width, centered, header and footer, sidebar on right)</u></span></h4>
<p>The above is a pretty common website layout and it&#8217;s rather easy to code.</p>
<p>The HTML:</p>
<pre name="code" class="html">
<div id="wrapper">
<div id="header">
	</div>
<div id="content">
	</div>
<div id="sidebar">
	</div>
<div id="footer">
	</div>
</div>
</pre>
<p>The CSS:</p>
<pre name="code" class="css">
#wrapper {width:960px; margin:0 auto}
#content {float:left; width:600px}
#sidebar {float:left; width:360px}
#footer {clear: both}
</pre>
<p>The specific widths are arbitrary, but it is necessary to include a width. The keys are centering the wrapper as described above in this post, floating both columns, and clearing the footer div. You could also float the sidebar div to the right. Either will work, though I find it easier to float both in the same direction.</p>
<p><br clear="all"/></p>
<h4><span>33. <u>Basic 3-column CSS layout (fixed width, centered, header and footer, sidebars on right and left of the content)</u></span></h4>
<p>Expanding on the above 2-column layout is this common 3-column layout.</p>
<p>The HTML:</p>
<pre name="code" class="html">
<div id="wrapper">
<div id="header">
	</div>
<div id="primary">
	</div>
<div id="content">
	</div>
<div id="secondary">
	</div>
<div id="footer">
	</div>
</div>
</pre>
<p>The CSS:</p>
<pre name="code" class="css">
#wrapper {width:960px; margin:0 auto}
#primary {float:left; width:230px}
#content {float:left; width:500px}
#secondary {float:left; width:230px}
#footer {clear: both}
</pre>
<p>Again the widths are arbitrary, but necessary. You can float the secondary div to the right if you prefer.</p>
<p><br clear="all"/></p>
<h4><span>34. <u>CSS Triangles and Other Shapes</u></span></h4>
<p>CSS borders come together at an angle at any corner. This isn&#8217;t obvious when setting a border that&#8217;s the same color on all sides or if your <code>border-width</code> is only a few px. Making the width much larger and setting different border-colors on different sides lets you see this clearly. Taking advantage of these angles we can use the border-property to <a target="_blank" rel="external nofollow" href="http://www.vanseodesign.com/css/creating-shapes-with-css-borders/"><strong>create some interesting shapes</strong></a>.</p>
<p><a target="_blank" rel="external nofollow" href="http://www.russellheimlich.com/blog/pure-css-shapes-triangles-delicious-logo-and-hearts/"><strong>Creating a triangle</strong></a> is a matter of setting the border-color on 3 of the 4 sides to transparent. You also want to set the width and height of the element to be 0 in order for all 4 corners to meet at a point. You can set the border opposite the triangle to 0 as well, but the adjacent borders need to maintain a width or the entire element with borders will collapse to a single point.</p>
<p>The HTML:</p>
<pre name="code" class="html">
<div class="triangle"></div>
</pre>
<p>The CSS:</p>
<pre name="code" class="css">
.triangle {
	border-color: transparent transparent green transparent;
	border-style: solid;
	border-width: 0px 300px 300px 300px;
	height: 0px;
	width: 0px;
}
</pre>
<p>With a little experimentation you can create moe interesting shapes, especially if you combine several elements.</p>
<p><br clear="all"/></p>
<h4><span>35. <u>Prevent a Line Break</u></span></h4>
<p>Sometimes the text in a link or heading will break where you don&#8217;t want it to.  A simple way to prevent this is:</p>
<pre name="code" class="css">
h1 { white-space:nowrap; }
</pre>
<h4><span>36. <u>Class vs. Id</u></span></h4>
<p>Use an Id for elements that are used once and only once on a page</p>
<p>The HTML:</p>
<pre name="code" class="html">
<div id="content"></div>
</pre>
<p>The CSS:</p>
<pre name="code" class="css">
#content {background: #fff}
</pre>
<p>Use a class for elements that may be reused on the page</p>
<p>The HTML:</p>
<pre name="code" class="html">
<p class="large-text">
</pre>
<p>The CSS:</p>
<pre name="code" class="css">
.large-text {font-size: 1.4em}
</pre>
<p><br clear="all"/></p>
<h4><span>37. <u>Replace Text with an Image</u></span></h4>
<p>Better typography through more font choices is here, but there are still limitations to using it in practice. Sometimes the easiest solution is to use an image. However you also want the original text to be there for search engines and screen readers. A simple way to have both text and image is to use the <code>text-indent</code> property.</p>
<pre name="code" class="css">
h1 {
	text-indent:-9999px;
	background:url("h1-image.jpg") no-repeat;
	width:200px;
	height:50px;
}
</pre>
<p>The height and width should match those of your image</p>
<p><br clear="all"/></p>
<h4><span>38. <u>Style the Element that has Focus in a Form</u></span></h4>
<p>A nice usability tip is to let people filling out a form know which input currently has focus. You can do this easily using the <code>:focus pseudo-selector</code></p>
<pre name="code" class="css">
input:focus { border: 2px solid green; }
</pre>
<p>This way your users will know exactly which field is ready for input</p>
<p><br clear="all"/></p>
<h4><span>39. <u>Understanding !important</u></span></h4>
<p>!important is a way to override <a target="_blank" rel="external nofollow" href="http://www.vanseodesign.com/css/css-specificity-inheritance-cascaade/"><strong>CSS specificity</strong></a>. In general it&#8217;s not the best solution since the more you use it, the more you end up needing to use it again. It can make your CSS unmaintainable in a hurry. It can be useful due to a quirk in IE. When you have something like the following</p>
<pre name="code" class="css">
h1 {
	color: red !important;
	color: blue
}
</pre>
<p>browsers should show the h1 with a color red. IE, however will show the style that comes last instead of following the rules of precedence. So the above code would show your h1 as red in all browsers except IE where the color would be blue.</p>
<p><br clear="all"/></p>
<h4><span>40. <u>Simple Debugging in CSS</u></span></h4>
<p>Sometimes your CSS doesn&#8217;t seem to be working like you expect and you want to isolate one element in your html to see what space it occupied. An easy way to do this is to give the element a border temporarily</p>
<pre name="code" class="css">
.element {border:1px solid red}
</pre>
<p>One downside of the above is the extra px in the border could temporarily throw your layout out of whack, since it increases the width of your element. You may find at times it drops a floated element further down the page for example. Still it can be a quick and easy way to see what&#8217;s going on and you can overcome the width limitation, by temporarily decreasing the width you&#8217;ve given to the element to compensate for the extra width the border adds.</p>
<p><br clear="all"/></p>
<h4><span>41. <u>Create a CSS Frame for Images</u></span></h4>
<p><img src="http://www.instantshift.com/wp-content/uploads/2010/03/ctatttystnl-07.jpg" alt="instantShift - CSS Tips and Tricks" title="instantShift - CSS Tips and Tricks" width="560" height="210" class="alignnone size-full top_m" /><br clear="all"/></p>
<p>Many images look nice a frame. You typically frame pictures before hanging them on a wall so why not <a target="_blank" rel="external nofollow" href="http://www.webdesignerwall.com/tutorials/css-decorative-gallery/"><strong>add a frame to images</strong></a> on your website. Just like what you can see how every article image here at <a href="http://www.instantshift.com/"><strong>instantShift</strong></a> is framed using modified verion of this very same trick.</p>
<p>The trick is to wrap your images in a div and add a simple class.</p>
<p>The HTML:</p>
<pre name="code" class="html">
<div class="frame"><img src="" alt="" height="" width="" /></div>
</pre>
<p>The CSS:</p>
<pre name="code" class="css">
.frame {
	border: 2px ridge #000;
	 padding: 10px;
	background-color: #fff;
}

.frame img {
	border: 2px solid #ooo;
	padding: 1px;
	 margin: 10px;
}
</pre>
<p>You can use a variety of border-style values to create different looks to the frame (groove, ridge, inset, outset, double, dotted, dashed, solid). The padding and background-color on the frame div will create the look of a mat around your image. Adding border, padding, and margin to the image itself can create the effect of having a second mat around your image for an extra effect.</p>
<p>Once set up all you&#8217;ll need to do to add your frame to any image is wrap it with a div and assign the class. You can even create several different styles of frames and then pick and choose which to use for each image.</p>
<p><br clear="all"/></p>
<h4><span>42. <u>Mobile Specific Stylesheets</u></span></h4>
<p>As more and more people are accessing the web via smart phones and other mobile devices we need to make sure our sites display well on different platforms. Fortunately  html allows you to <a target="_blank" rel="external nofollow" href="http://www.alistapart.com/articles/return-of-the-mobile-stylesheet"><strong>serve different stylesheets for mobile devices</strong></a>.</p>
<pre name="code" class="html">
<link type="text/css" rel="stylesheet" href="handheldstyle.css" media="handheld" />
</pre>
<p><br clear="all"/></p>
<h4><span>43. <u>Letterpress Type Through CSS</u></span></h4>
<p>The basic idea is to make use of the CSS3 property for <a target="_blank" rel="external nofollow" href="http://line25.com/tutorials/create-a-letterpress-effect-with-css-text-shadow">text-shadow to create the letterpress effect</a>.</p>
<pre name="code" class="css">
.element {
	color: #222;
	text-shadow: 0px 2px 3px #555;
}
</pre>
<p>The trick is to use a shadow color that&#8217;s lighter than the text color and offset it a little and add a bit of blur. The values above for the text-shadow property are:</p>
<pre name="code" class="css">
text-shadow: x-offset y-offset blur color;
</pre>
<p><br clear="all"/></p>
<h4><span>44. <u>Setting Page Breaks For Print</u></span></h4>
<p>Some people will want to print your pages and you may want your pages to print in a more readable form. For example you may have a table of data on a page and you&#8217;d prefer the entire table be printed on one page as opposed half the table ending up at the bottom of one page and the other half at the top of the next. CSS offers a way to force a <a target="_blank" rel="external nofollow" href="http://www.w3.org/TR/css3-page/#page-breaks"><strong>page break</strong></a> in some places and prohibit in it others.</p>
<p>First you&#8217;ll need to direct your styles to printed media through @media print</p>
<pre name="code" class="html">
<style type=text/css>
@media print
table {page-break-inside: avoid}
</style>
</pre>
<p>The above will tell printers to do what they can not to break the table over two pages. CSS provides a total of 3 properties related to printed page breaks. Possible values in parenthesis.</p>
<p><a target="_blank" rel="external nofollow" href="http://www.w3.org/TR/css3-page/#page-break-before"><strong><code>page-break-before</code></strong></a> (auto, always, avoid, left, right, inherit)</p>
<p><a target="_blank" rel="external nofollow" href="http://www.w3.org/TR/css3-page/#page-break-after"><strong><code>page-break-after</code></strong></a> (auto, always, avoid, left, right, inherit)</p>
<p><a target="_blank" rel="external nofollow" href="http://www.w3.org/TR/css3-page/#page-break-inside"><strong><code>page-break-inside</code></strong></a> (auto, avoid, inherit)</p>
<p><br clear="all"/></p>
<h4><span>45. <u>Creating Circles With Border-Radius</u></span></h4>
<p>The CSS2 border-radius property can be used to create circles in all browsers that support the property. The trick is to set the height and width of the element so they&#8217;re the same and set the border-radius of the element to be half that value.</p>
<pre name="code" class="css">
.cirlce {
	width: 300px;
	height: 300px;
	background-color: red;
	border-radius: 150px;
	-moz-border-radius: 150px;
	-webkit-border-radius: 150px;
}
</pre>
<p>border-radius is the CSS standard property</p>
<ul>
<li><code>-moz-border-radius</code> is for Mozilla based browsers like Firefox</li>
<li><code>-webkit-border-radius</code> is for webkit based browsers like Safari and Chrome</li>
</ul>
<p>Unfortunately none of the above will work in any current version of Internet Explorer.</p>
<p><br clear="all"/></p>
<h4><span>46. <u>CSS Tooltips</u></span></h4>
<p>You can create a lightweight CSS cross browser tooltip easily with a few lines of code.</p>
<p>The HTML:</p>
<pre name="code" class="html">
This is the <a class="tooltip" href="#">Tooltip Link<span>This will be the text that shows up in the tooltip</span></a> You can place any text you want here.
</pre>
<p>The CSS:</p>
<pre name="code" class="css">
a.tooltip {position: relative}
a.tooltip span {display:none; padding:5px; width:200px;}
a:hover {background:#fff;} /*background-color is a must for IE6*/
a.tooltip:hover span{display:inline;  position:absolute;}
</pre>
<p>You can add more styles to the above to suit your design. The key is the span is set to <code>display: none</code> until you hover over the link. When you hover over the link the display is changed to show inline and given a position of absolute. position: relative is necessary on the link in order to ensure the tooltip is positioned in relation to the link and not another containing element.</p>
<p><br clear="all"/></p>
<h4><span>47. <u>Creating a Fixed Header</u></span></h4>
<p>Instead of letting your entire page scroll you might want to hold the header with your logo and navigation fixed in place and <a target="_blank" rel="external nofollow" href="http://limpid.nl/lab/css/fixed/header"><strong>only let the content below scroll</strong></a>.</p>
<p>The HTML:</p>
<pre name="code" class="html">
<div id="header">header </div>
<div id="content">content </div>
</pre>
<p>The CSS:</p>
<pre name="code" class="html">
#header {
   position:fixed;
}
</pre>
<p>You want to make sure to keep the header and content divs separate and then use <code>position: fixed</code> on the header. Other ideas you can try are <a target="_blank" rel="external nofollow" href="http://www.imaputz.com/cssStuff/bigFourVersion.html"><strong>creating a scrollable table with a fixed header</strong></a> within your page or keeping both <a target="_blank" rel="external nofollow" href="http://www.noobcube.com/tutorials/html-css/fixed-header-footer-layout-a-beginners-guide-/"><strong>header and footer fixed while allowing your content to scroll</strong></a> between them.</p>
<p><br clear="all"/>
</div>
<h1><span>Further Resources</span></h1>
</p>
<p>
<ul>
<li><strong><a target="_blank" rel="external nofollow" href="http://www.gracesmith.co.uk/84-amazingly-useful-css-tips-resources/">84 Amazingly Useful CSS Tips &#038; Resources | GraceSmith</a></strong></li>
<li><strong><a target="_blank" rel="external nofollow" href="http://www.hongkiat.com/blog/20-useful-css-tips-for-beginners/">20 Useful CSS Tips For Beginners &#8211; Part I</a>, <a target="_blank" rel="external nofollow" href="http://www.hongkiat.com/blog/20-useful-css-tips-for-beginners/">Part II | Hongkiat</a></strong></li>
<li><strong><a target="_blank" rel="external nofollow" href="http://www.smashingmagazine.com/2007/01/19/53-css-techniques-you-couldnt-live-without/">CSS-Techniques You Couldn’t Live Without &#8211; Part I</a>, <a target="_blank" rel="external nofollow" href="http://www.smashingmagazine.com/2009/07/20/50-new-css-techniques-for-your-next-web-design/">Part II | SmashingMagazine</a></strong></li>
<li><strong><a target="_blank" rel="external nofollow" href="http://www.evolt.org/ten-css-tricks-you-may-not-know">Ten CSS tricks you may not know | Evolt</a></strong></li>
<li><strong><a target="_blank" rel="external nofollow" href="http://www.vanseodesign.com/css/css-background-property/">CSS Backgrounds: 12 Solutions To Common Questions | VanSeoDesign</a></strong></li>
<li><strong><a target="_blank" rel="external nofollow" href="http://blog.themeforest.net/general/15-css-tricks-that-must-be-learned/">15 CSS Tricks That Must be Learned | ThemeForest</a></strong></li>
<li><strong><a target="_blank" rel="external nofollow" href="http://inspectelement.com/articles/simple-css-tips-that-go-a-long-way/">Simple CSS Tips that Go a Long Way | InspectElement</a></strong></li>
<li><strong><a target="_blank" rel="external nofollow" href="http://24ways.org/2009/cleaner-code-with-css3-selectors">Cleaner Code with CSS3 Selectors | 24ways</a></strong></li>
<li><strong><a target="_blank" rel="external nofollow" href="http://net.tutsplus.com/tutorials/html-css-techniques/how-to-add-variables-to-your-css-files/">How to Add Variables to Your CSS Files  | NetTuts</a></strong></li>
<li><strong><a target="_blank" rel="external nofollow" href="http://www.noupe.com/css/15-effective-tips-and-tricks-from-the-masters-of-css.html">15 Effective Tips and Tricks from the Masters of CSS | Noupe</a></strong></li>
<li><strong><a target="_blank" rel="external nofollow" href="http://www.designer-daily.com/8-css-tips-for-better-linking-1424">8 CSS tips for better linking | DesignerDaily</a></strong></li>
<li><strong><a target="_blank" rel="external nofollow" href="http://hungred.com/useful-information/css-tips-tricks-collection/">CSS Tips and Tricks Collection | Hungred</a></strong></li>
<li><strong><a target="_blank" rel="external nofollow" href="http://css-tricks.com/">Regular CSS tricks by Chris Coyier | CSS-Tricks</a></strong></li>
</ul>
<h1><span>Other Resources</span></h1>
<ul>
<li><a target="_blank" rel="external nofollow" href="http://en.wikipedia.org/wiki/Cascading_Style_Sheets"><strong>CSS | From Wikipedia, the free encyclopedia</strong></a></li>
<li><a target="_blank" rel="external nofollow" href="http://www.w3.org/Style/CSS/"><strong>CSS | From W3C (World Wide Web Consortium)</strong></a></li>
</ul>
<h1><span>Image Credits</span></h1>
<ul>
<li><a target="_blank" rel="external nofollow" href="http://www.redbubble.com/people/rubyred/t-shirts/3288446-2-geek-hand-sign"><strong>Article Main Image Credits | Roger</strong></a></li>
<li><a target="_blank" rel="external nofollow" href="http://www.flickr.com/photos/kayx1984/4386535174/"><strong>ColorCan | Kayx Hors ligne</strong></a></li>
<li><a target="_blank" rel="external nofollow" href="http://www.flickr.com/photos/40645538@N00/233228813/"><strong>Child Walking | D. Sharon Pruitt</strong></a></li>
</ul>
<h1><span>Find Something Missing?</span></h1>
<p><strong>Please feel free to share any tips, tricks or technique that you think would be a great addition in this collection and that has not been listed already.</strong></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.instantshift.com/2010/03/15/47-css-tips-tricks-to-take-your-site-to-the-next-level/feed/</wfw:commentRss>
		<slash:comments>101</slash:comments>
		</item>
		<item>
		<title>CSS Box Model: The Foundation For Improving Your CSS</title>
		<link>http://www.instantshift.com/2009/11/16/css-box-model-the-foundation-for-improving-your-css/</link>
		<comments>http://www.instantshift.com/2009/11/16/css-box-model-the-foundation-for-improving-your-css/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 11:04:53 +0000</pubDate>
		<dc:creator>Steven Bradley</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[box]]></category>
		<category><![CDATA[box model]]></category>
		<category><![CDATA[CSS box model]]></category>
		<category><![CDATA[CSS development]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[model]]></category>

		<guid isPermaLink="false">http://www.instantshift.com/?p=2325</guid>
		<description><![CDATA[The CSS box model lies behind everything you do in CSS. Every element is defined by a rectangular box that encloses that element. Understanding how the box model works is a key to understanding CSS and having greater control over your layout and presentation. Let&#8217;s dive right in and talk about what the CSS box [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin: 4px 0px 10px 20px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.instantshift.com%2F2009%2F11%2F16%2Fcss-box-model-the-foundation-for-improving-your-css%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.instantshift.com%2F2009%2F11%2F16%2Fcss-box-model-the-foundation-for-improving-your-css%2F" height="61" width="51" /></a></div><p>The <a rel="external nofollow" href="http://www.w3.org/TR/CSS2/box.html"><strong>CSS box model</strong></a> lies behind everything you do in CSS. Every element is defined by a rectangular box that encloses that element. Understanding how the box model works is a key to understanding CSS and having greater control over your layout and presentation. Let&#8217;s dive right in and talk about what the CSS box model is, how one box affects the boxes around it, and some common browser issues when displaying CSS boxes.</p>
<p>In nutshell, the box model in CSS describes the boxes which are being generated for HTML-elements. In this post below you’ll learn <strong>the tips and techniques exactly about CSS box model</strong> to achieve best out of CSS development.<br />
<span id="more-2325"></span><br />
<br clear="all"/></p>
<p><strong>You may be interested in the following related articles as well.</strong></p>
<ul>
<li><a target="_blank" href="http://www.instantshift.com/2009/04/26/how-to-create-a-better-online-portfolio/"><strong>How to Create A Better Online Portfolio</strong></a></li>
<li><a target="_blank" href="http://www.instantshift.com/2009/11/11/why-is-social-interaction-important-for-a-website/"><strong>Why is Social Interaction Important For a Website</strong></a></li>
<li><a target="_blank" href="http://www.instantshift.com/2009/02/24/21-reasons-why-readers-don%e2%80%99t-like-your-blog/"><strong>Reasons Why Readers Don’t Like Your Blog</strong></a></li>
<li><a target="_blank" href="http://www.instantshift.com/2009/03/10/11-tips-to-reduce-server-load-and-save-bandwidth/"><strong>Tips to Reduce Server Load and Save Bandwidth</strong></a></li>
<li><a target="_blank" href="http://www.instantshift.com/2009/02/14/how-to-increase-web-traffic-through-search-engines/"><strong>How to Increase Web Traffic through Search Engines!</strong></a></li>
<li><a target="_blank" href="http://www.instantshift.com/2009/03/10/11-tips-to-reduce-server-load-and-save-bandwidth/"><strong>11 Tips to Reduce Server Load and Save Bandwidth</strong></a></li>
</ul>
<p>Please feel free to join us and you are always welcome to share your thoughts even if you have more reference links related to other money saving tips that our readers may like.</p>
<p></p>
<p>Don’t forget to <a rel="external nofollow" href="http://feeds2.feedburner.com/ishift"><img src="http://www.instantshift.com/images/rss.png" alt="Subscribe to our RSS-feed" style="float:none;padding:0;margin:0;border:0;" align="absmiddle" /> <strong>subscribe to our RSS-feed</strong></a> and <a rel="external nofollow" href="http://twitter.com/instantshift"><img src="http://www.instantshift.com/images/twitter.png" alt="Follow us on Twitter" style="float:none;padding:0;margin:0;border:0;" align="absmiddle" /> <strong>follow us on Twitter</strong></a> &mdash; for recent updates.</p>
<p><br clear="all"/></p>
<div class="newpost">
<h1><span>What is the CSS Box Model?</span></h1>
<p></p>
<div class="newpost" style="padding-left:30px;">
<p>Every element in the document tree is defined by a rectangular box. The <a target="_blank" rel="external nofollow" href="http://www.w3.org/TR/CSS3-box/"><strong>CSS box model</strong></a> describes those boxes and defines the properties each has. The easiest way to understand how the box model works is with a simple image.</p>
<p><img src="http://www.instantshift.com/wp-content/uploads/2009/11/cssbm-01.jpg" alt="instantShift - CSS Box Model" title="instantShift - CSS Box Model" width="560" class="alignnone size-full top_m" /><br clear="all"/></p>
<p>Every element has a width and height associated with its content area. Each element then has an area of padding surrounding the content and a border containing the padding and content area. Finally each element has a margin outside of its border. Paddings, borders, and margins have values for their top, right, bottom, and left sides.</p>
<p>If you think of an element&#8217;s edge as being it&#8217;s border then padding controls space inside the element and margin controls space outside the element and between neighboring elements. Note that when considering the <a target="_blank" rel="external nofollow" href="http://www.vanseodesign.com/CSS/CSS-background-property/"><strong>background property</strong></a> of any element that background extends to the elements border and doesn&#8217;t include the margin of the element.</p>
</div>
<p><br clear="all"/></p>
<h1><span>Differences Between Block Boxes and Inline Boxes</span></h1>
<p></p>
<div class="newpost" style="padding-left:30px;">
<p>If you&#8217;re familiar with the CSS display property, you know it has values for block, inline, and none. Block and inline are <a target="_blank" rel="external nofollow" href="http://www.w3.org/TR/CSS2/visuren.html#box-gen"><strong>2 different types of boxes</strong></a>. Both adhere to the box model with one key difference in the <a target="_blank" rel="external nofollow" href="http://www.w3.org/TR/CSS2/visuren.html#block-formatting"><strong>way each is laid out on the page</strong></a>.</p>
<p><img src="http://www.instantshift.com/wp-content/uploads/2009/11/cssbm-02.jpg" alt="instantShift - CSS Box Model" title="instantShift - CSS Box Model" width="560" class="alignnone size-full top_m" /><br clear="all"/></p>
<p>Block level boxes are laid out vertically one after the other. If you have two block level boxes next to each other in your html, the second will sit below the first. Inline boxes on the other hand are laid out horizontally. An inline box will always sit to the right of the box that precedes it, assuming there&#8217;s enough room in the containing element.</p>
<p>Inline boxes will wrap though. They will start to the right of the previous box and fill whatever horizontal space is remaining. They will then wrap to the next line and again move to fill the horizontal space. A block level box would automatically drop to the next line before filling any space.</p>
<p>Block and inline cover two of the display properties. The third none says no block exists. If you assign the value of none to any CSS box, that box is completely removed from the normal document flow. Conversely if you set the CSS property <a target="_blank" rel="external nofollow" href="http://www.vanseodesign.com/CSS/visibility-vs-display/"><strong>visibility to hidden</strong></a>, the box is still there filling the space according to the CSS box model rules. You don&#8217;t see it, but it does hold the space.</p>
</div>
<p><br clear="all"/></p>
<h1><span>Floats, Positioning, and the Normal Document Flow</span></h1>
<p></p>
<div class="newpost" style="padding-left:30px;">
<p>The discussion above about block and inline boxes assumed each was in the normal document flow. Floated and positioned elements are still boxes, but they are removed from the normal document flow in different ways. Both also alter how other elements react to their box.</p>
<ul>
<li><strong>Normal flow</strong> &#8212; In CSS 2.1, normal flow includes block formatting of block boxes, inline formatting of inline boxes, relative positioning of block or inline boxes, and positioning of run-in boxes.</li>
<li><strong>Floats</strong> &#8212; In the <a target="_blank" rel="external nofollow" href="http://www.vanseodesign.com/CSS/understanding-CSS-floats/<br />
"><strong>float model</strong></a>, a box is first laid out according to the normal flow, then taken out of the flow and shifted to the left or right as far as possible. Content may flow along the side of a float.</li>
<li><strong>Absolute Positioning</strong> &#8212; In the absolute positioning model, a box is removed from the normal flow entirely (it has no impact on later siblings) and assigned a position with respect to a containing block.</li>
<li><strong>Relative Positioning</strong> &#8212; In the relative positioning model, a box is shifted relative to its position in the normal document flow. Other elements are not affected and lay where they would had no positioning been applied.</li>
</ul>
<p>Boxes will flow around a floated element, they will act as though absolutely positioned elements are not there, and they will treat relatively positioned elements as though no positioning was applied at all.</p>
</div>
<p><br clear="all"/></p>
<h1><span>Calculating the Widths and Heights of Boxes</span></h1>
<p></p>
<div class="newpost" style="padding-left:30px;">
<p><img src="http://www.instantshift.com/wp-content/uploads/2009/11/cssbm-03.jpg" alt="instantShift - CSS Box Model" title="instantShift - CSS Box Model" width="560" class="alignnone size-full top_m" /><br clear="all"/></p>
<p>When you set a width or height in CSS you&#8217;re setting the width or height of the content area portion of a box only.  The width and height of the containing block (box) is defined as follows:</p>
<p></p>
<p><span class="txt-18-b">width of containing block (box)</span><em><strong> = &#8216;margin-left&#8217; + &#8216;border-left-width&#8217; + &#8216;padding-left&#8217; + &#8216;width&#8217; + &#8216;padding-right&#8217; + &#8216;border-right-width&#8217; + &#8216;margin-right&#8217;</strong></em></p>
<p></p>
<p><span class="txt-18-b">height of containing block (box)</span><em><strong> = &#8216;margin-top&#8217; + &#8216;border-top-width&#8217; + &#8216;padding-top&#8217; + &#8216;height&#8217; + &#8216;padding-bottom&#8217; + &#8216;border-bottom-width&#8217; + &#8216;margin-bottom&#8217;</strong></em></p>
<p></p>
<p>Notice that the width and height of the block includes both the left and right or top and bottom margin and padding as well as the border width.</p>
<p>When one of these values is not specified browser defaults are used. One issue with <a target="_blank" rel="external nofollow" href="http://www.vanseodesign.com/CSS/cross-browser-CSS/"><strong>cross browser development</strong></a> is that different browsers may use different default values for the properties defining a box. The reason to use CSS reset files is to ensure that all default values are the same across browsers.</p>
</div>
<p><br clear="all"/></p>
<h1><span>Issues with IE6 and the Box Model</span></h1>
<p></p>
<div class="newpost" style="padding-left:30px;">
<p>Older versions of Internet Explorer, including IE6 (without a proper doctype) have a <a target="_blank" rel="external nofollow" href="http://en.wikipedia.org/wiki/Internet_Explorer_box_model_bug"><strong>box model bug</strong></a> and calculate the width property inaccurately.</p>
<p>Width should only refer to the width of the content area. Older versions of IE and IE6 in <a target="_blank" rel="external nofollow" href="http://CSS.maxdesign.com.au/listamatic/about-boxmodel.htm"><strong>quirks mode</strong></a> calculate the width as being the width of the content area + left and right paddings + the width of the right and left borders</p>
<p>Similarly it includes paddings and borders when calculating the height property.</p>
<p><img src="http://www.instantshift.com/wp-content/uploads/2009/11/cssbm-04.jpg" alt="instantShift - CSS Box Model" title="instantShift - CSS Box Model" width="560" class="alignnone size-full top_m" /><br clear="all"/></p>
<p>For the most part you shouldn&#8217;t have to deal with this issue any more as long as you use a <a target="_blank" rel="external nofollow" href="http://www.alistapart.com/articles/doctype/"><strong>proper doctype</strong></a>. Beware though that IE6 is still used and if you fail to specify a doctype then IE6 will revert to quirks mode and calculate widths and heights inaccurately as described in this section</p>
</div>
<p><br clear="all"/></p>
<h1><span>Summary</span></h1>
<p></p>
<div class="newpost" style="padding-left:30px;">
<p>The CSS box model is the foundation upon which the rest of CSS is based. Remember that every element in the document tree is defined by a rectangular box described by this box model. Boxes are of one of two types, block and inline, each with its own rules about where it lays and where elements that come after it lay.</p>
<p><img src="http://www.instantshift.com/wp-content/uploads/2009/11/cssbm-05.jpg" alt="instantShift - CSS Box Model" title="instantShift - CSS Box Model" width="560" class="alignnone size-full top_m" /><br clear="all"/></p>
<p><strong>When a box is set via display:</strong> none the space that box occupied collapses.</p>
<p><strong>When a box is set via visibility:</strong> hidden the box is not seen, but it still holds its space.</p>
<p>Floats and positioned elements take boxes out of the normal document flow and affect where they sit and where the elements around them also sit.</p>
<p>Older versions of Internet Explorer inaccurately calculate the width of the visible content area of a box and consequently the box itself. It&#8217;s an issue you shouldn&#8217;t counter often, but one to still be aware of.</p>
<p>I hope this post has helped you to understand better how the box model works, but if you have any questions please ask.</p>
</div>
<h1><span>Images Credits</span></h1>
<ul>
<li><strong><a target="_blank" rel="external nofollow" href="http://www.flickr.com/photos/82386510@N00/3711320805/">102 by <em>Me and the sysop</em></a></strong></li>
<li><strong><a target="_blank" rel="external nofollow" href="http://www.sxc.hu/photo/1238556">Out of the norm by <em>immrchris</em></a></strong></li>
</ul>
<h1><span>Find Something Missing?</span></h1>
<p><strong>While writing this article, it&#8217;s always a possibility that we missed some other great tips related to CSS box model. Feel free to share it with us.</strong></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.instantshift.com/2009/11/16/css-box-model-the-foundation-for-improving-your-css/feed/</wfw:commentRss>
		<slash:comments>80</slash:comments>
		</item>
	</channel>
</rss>
