<?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>Bright Cherry &#187; CSS</title>
	<atom:link href="http://www.brightcherry.co.uk/scribbles/category/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.brightcherry.co.uk/scribbles</link>
	<description></description>
	<lastBuildDate>Fri, 27 Aug 2010 18:00:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Remove Redundant CSS From Your Stylesheet</title>
		<link>http://www.brightcherry.co.uk/scribbles/2009/01/14/remove-redundant-css-from-your-stylesheet/</link>
		<comments>http://www.brightcherry.co.uk/scribbles/2009/01/14/remove-redundant-css-from-your-stylesheet/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 19:11:03 +0000</pubDate>
		<dc:creator>Maruf</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.brightcherry.co.uk/scribbles/?p=139</guid>
		<description><![CDATA[Last week someone approached me with a problem- their website was running significantly slow. There were many obvious problems, but the issue I&#8217;m going to cover today is CSS stylesheets. Believe it or not, but stylesheets can slowdown a website if they get too bloated. It&#8217;s extremely common for a web developer to fill stylesheets [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.brightcherry.co.uk/images/blogimages/css.jpg" title="Remove Redundant CSS" alt="Remove Redundant CSS" /></p>
<p>Last week someone approached me with a problem- their website was running significantly slow. There were many obvious problems, but the issue I&#8217;m going to cover today is CSS stylesheets.</p>
<p>Believe it or not, but stylesheets can slowdown a website if they get too bloated. It&#8217;s extremely common for a web developer to fill stylesheets with unused code. This usually occurs over years of upgrading and maintaining a website- a lot of redundant styling builds up. It also happens when developers first build a website- the trial and error approach of developing usually leaves scars. In this case, CSS code.</p>
<p>The website I worked on had a HUGE stylesheet, and it was definitely one of the factors that helped with the slow loading. In fact, by the time it was uncluttered, the stylesheet had shrunk by more than three-quarters.</p>
<p>To help detect redundant CSS code, refer to this <a href="http://services.immike.net/css-checker/" rel="nofollow" title="Remove Redundant CSS">Remove Redundant CSS Tool</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brightcherry.co.uk/scribbles/2009/01/14/remove-redundant-css-from-your-stylesheet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rounded Corners With CSS</title>
		<link>http://www.brightcherry.co.uk/scribbles/2008/10/15/rounded-corners-with-css/</link>
		<comments>http://www.brightcherry.co.uk/scribbles/2008/10/15/rounded-corners-with-css/#comments</comments>
		<pubDate>Wed, 15 Oct 2008 09:23:08 +0000</pubDate>
		<dc:creator>Maruf</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.brightcherry.co.uk/scribbles/?p=69</guid>
		<description><![CDATA[This is a pretty simple but useful tutorial. A lot of people physically create round-edged backgrounds with applications like Photoshop. While this is time-consuming and a complete nightmare for updating purposes, there is a much more efficient way of doing this with the use of CSS. Only problem is that it doesn&#8217;t work in all [...]]]></description>
			<content:encoded><![CDATA[<p>This is a pretty simple but useful tutorial. A lot of people physically create round-edged backgrounds with applications like Photoshop. While this is time-consuming and a complete nightmare for updating purposes, there is a much more efficient way of doing this with the use of CSS. Only problem is that it doesn&#8217;t work in all browsers just yet e.g Internet Explorer <img src='http://www.brightcherry.co.uk/scribbles/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  However, it works with the cool, geeky browsers like Firefox. If anyone knows an I.E fix, holla!</p>
<h4>For example, if you want this image to have rounded edges:</h4>
<div id="nonround">
</div>
<h4>To do the following:</h4>
<div id="round">
</div>
<h4>You can use the following CSS code:</h4>

<div class="wp_codebox_msgheader"><span class="right"><sup></sup></span><span class="left"><a rel="nofollow" href="javascript:;" onclick="javascript:showCodeTxt('p69code2'); return false;">View Code</a> CSS</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p692"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
</pre></td><td class="code" id="p69code2"><pre class="css" style="font-family:monospace;"> <span style="color: #cc00cc;">#nonround</span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">200px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">200px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">red</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span><span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#round</span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">200px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">200px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">red</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span><span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
 -webkit-border-top-left-radius<span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
 -webkit-border-top-right-radius<span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
 -webkit-border-bottom-left-radius<span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
 -webkit-border-bottom-right-radius<span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
&nbsp;
 -khtml-border-radius-topleft<span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
 -khtml-border-radius-topright<span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
 -khtml-border-radius-bottomleft<span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
 -khtml-border-radius-bottomright<span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
&nbsp;
 -moz-border-radius-topleft<span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
 -moz-border-radius-topright<span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
 -moz-border-radius-bottomleft<span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
 -moz-border-radius-bottomright<span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>	
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>(the various rules are somewhat duplicated so they work across various browsers)</p>
<p>Cool, right? Right.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brightcherry.co.uk/scribbles/2008/10/15/rounded-corners-with-css/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Pure CSS Image Gallery</title>
		<link>http://www.brightcherry.co.uk/scribbles/2008/09/30/pure-css-image-gallery/</link>
		<comments>http://www.brightcherry.co.uk/scribbles/2008/09/30/pure-css-image-gallery/#comments</comments>
		<pubDate>Tue, 30 Sep 2008 07:50:09 +0000</pubDate>
		<dc:creator>Maruf</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.brightcherry.co.uk/scribbles/?p=46</guid>
		<description><![CDATA[If you look in BrightCherry&#8217;s team page, you&#8217;ll notice that I&#8217;ve implemented a small CSS image gallery for a few of our team members. It&#8217;s a simple CSS image gallery- no Javascript or any other scripting language is required for the feature to work. I had someone ask me how I did it, so I [...]]]></description>
			<content:encoded><![CDATA[<p>If you look in <a href="/team/" rel="nofollow"  title="BrightCherry's team page">BrightCherry&#8217;s team page</a>, you&#8217;ll notice that I&#8217;ve implemented a small CSS image gallery for a few of our team members. It&#8217;s a simple CSS image gallery- no Javascript or any other scripting language is required for the feature to work. I had someone ask me how I did it, so I thought I would share the code.</p>
<h4>Demo of the CSS gallery</h4>
<div id="gallerywrapper">
<div id="defaultimage">
<img class="mainimage" src="/images/cssgalleryblogpost/image1.jpg" title="Image 1" alt="Image 1" />
</div>
<ul class="gallerydisplay">
<li>
<a href="#" rel="nofollow"><br />
<img class="thumbnail" src="/images/cssgalleryblogpost/image1.jpg" title="Image 1" alt="Image 1" /><br />
<img class="mainimage" src="/images/cssgalleryblogpost/image1.jpg" title="Image 1" alt="Image 1" /><br />
</a>
</li>
<li>
<a href="#" rel="nofollow"><br />
<img class="thumbnail" src="/images/cssgalleryblogpost/image2.jpg" title="Image 2" alt="Image 2" /><br />
<img class="mainimage" src="/images/cssgalleryblogpost/image2.jpg" title="Image 2" alt="Image 2" /></p>
<p></a>
</li>
</ul>
</div>
<p>It&#8217;s simple, clean and affective.</p>
<h4>CSS Image Gallery Code</h4>
<p><a href="http://www.brightcherry.co.uk/downloads/css_image_gallery.zip" rel="nofollow"  title="CSS Image Gallery Code">Download</a></p>
<p>Any probs? Let me know. I&#8217;m not offering full-support on this feature, but if you have any queries, i&#8217;ll do my best to assist.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brightcherry.co.uk/scribbles/2008/09/30/pure-css-image-gallery/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Centering Text Vertically With CSS</title>
		<link>http://www.brightcherry.co.uk/scribbles/2008/09/15/centering-text-vertically-with-css/</link>
		<comments>http://www.brightcherry.co.uk/scribbles/2008/09/15/centering-text-vertically-with-css/#comments</comments>
		<pubDate>Mon, 15 Sep 2008 22:37:39 +0000</pubDate>
		<dc:creator>Maruf</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.brightcherry.co.uk/scribbles/?p=30</guid>
		<description><![CDATA[CSS can be extremely odd some times, and vertically centralizing text in CSS is one of those occasions which makes me think that&#8230; Centering text horizontally within a div is extremely straight forward. All you need to to do is use the text-align:center property. But for some reason, there isn&#8217;t an easy remedy to centralize [...]]]></description>
			<content:encoded><![CDATA[<p>CSS can be extremely odd some times, and vertically centralizing text in CSS is one of those occasions which makes me think that&#8230;</p>
<p>Centering text horizontally within a div is extremely straight forward. All you need to to do is use the <strong class="pink">text-align:center</strong> property. But for some reason, there isn&#8217;t an easy remedy to centralize text vertically with CSS. It&#8217;s easily accomplished with tables, but as web development has progressed, the use of tables is now frowned upon by the web geeks (unless you&#8217;re displaying tabular data).</p>
<p>Admittedly, aligning text vertically central is not a feature I require a lot of the times, but I do need it now and then. For instance, I needed it this morning&#8230;</p>
<h4>Example for centering text vertically</h4>
<p>Below is an image of a navigation bar. I&#8217;ve added the border just for visual ease (it&#8217;s not part of the design). Ideally, i&#8217;d like the <strong>&#8220;360-degree feedback&#8221;</strong> link vertically central with in its container, so it&#8217;s not floating at the top, touching the border.</p>
<p><img title="Centering Text Vertically With CSS" src="http://www.brightcherry.co.uk/images/blogimages/cssverticalwrong.jpg" alt="Centering Text Vertically With CSS" /></p>
<p>Like this&#8230;</p>
<p><img title="Centering Text Vertically With CSS" src="http://www.brightcherry.co.uk/images/blogimages/cssvertical.jpg" alt="Centering Text Vertically With CSS" /></p>
<h4>The Solution</h4>
<p>Here&#8217;s the code I used- I&#8217;ve tested it in I.E 6/7 and Firefox 2/3.</p>
<pre lang="css" line="1" colla="+">
<p>/* dark blue ---*/</p>
<p>#contentleft_btnsdarkblue{<br />
background:url('images/button4.jpg') left no-repeat;<br />
padding-left:35px;<br />
height:60px;<br />
display: table;<br />
#position: relative;<br />
overflow: hidden;<br />
}</p>
<p>#contentleft_btnsdarkblue a{<br />
color:#004064;<br />
}</p>
<p>/* light blue ---*/</p>
<p>#contentleft_btnslightblue{<br />
background:url('images/button1.jpg') left no-repeat;<br />
padding-left:35px;<br />
height:60px;<br />
display: table;<br />
#position: relative;<br />
overflow: hidden;<br />
width:160px;<br />
}</p>
<p>#contentleft_btnslightblue a{<br />
color:#009FE0;<br />
}</p>
<p>.contentleft_btntxt{<br />
#position: relative;<br />
#top: -50%<br />
}</p>
<p>.contentleft_vertical{<br />
#position: absolute;<br />
#top: 50%;display:<br />
table-cell;<br />
vertical-align: middle;<br />
width:160px;<br />
}</p>
<div id="contentleft_btnsdarkblue">
<div class="contentleft_vertical">
<div class="contentleft_btntxt">
<a href="#" rel="nofollow"  title="360-degree feedback">360-degree feedback</a>
</div>
</div>
</div>
<div id="contentleft_btnslightblue">
<div class="contentleft_vertical">
<div class="contentleft_btntxt">
<a href="#" rel="nofollow"  title="Personal Impact Assessment">Personal Impact Assessment</a>
</div>
</div>
</div>
<p>[/pre]</p>
<p>For ease, you can download the <a href="http://www.brightcherry.co.uk/downloads/css-vertically-align.zip" rel="nofollow" title="Centering Text Vertically With CSS" >Centering Text Vertically With CSS</a> code.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brightcherry.co.uk/scribbles/2008/09/15/centering-text-vertically-with-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Different CSS Stylesheets For Different Browsers</title>
		<link>http://www.brightcherry.co.uk/scribbles/2008/09/01/using-different-css-stylesheets-for-different-browsers/</link>
		<comments>http://www.brightcherry.co.uk/scribbles/2008/09/01/using-different-css-stylesheets-for-different-browsers/#comments</comments>
		<pubDate>Mon, 01 Sep 2008 19:32:46 +0000</pubDate>
		<dc:creator>Maruf</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.brightcherry.co.uk/scribbles/?p=25</guid>
		<description><![CDATA[I&#8217;ve been crunching through a lot of CSS this week, and on occasion I&#8217;ve had to overcome the classic CSS battle between Firefox and I.E. It&#8217;s no secret that Internet Explorer and Firefox tend to disagree on certain elements in which they render CSS properties. So while everything may line up perfectly using one browser, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been crunching through a lot of CSS this week, and on occasion I&#8217;ve had to overcome the classic CSS battle between Firefox and I.E. It&#8217;s no secret that Internet Explorer and Firefox tend to disagree on certain elements in which they render CSS properties. So while everything may line up perfectly using one browser, it can look ill-aligned in another. That&#8217;s when developers tend to rely on CSS browser hacks.</p>
<p>In general, you should try to avoid using CSS browser hacks and/or loading different stylesheets for specific browsers as fluently as possible, because it&#8217;s not good practice. In fact, most good CSS developers should be able to avoid CSS browser hacks/alternative CSS loading. However, on rare occasions, it&#8217;s required to achieve a perfect result. </p>
<h4>CSS for specific browsers</h4>
<p><b class="pink">IE-Only stylesheet</b></p>

<div class="wp_codebox_msgheader"><span class="right"><sup></sup></span><span class="left"><a rel="nofollow" href="javascript:;" onclick="javascript:showCodeTxt('p25code14'); return false;">View Code</a> CSS</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p2514"><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code" id="p25code14"><pre class="css" style="font-family:monospace;">&lt;!--<span style="color: #00AA00;">&#91;</span>if IE<span style="color: #00AA00;">&#93;</span><span style="color: #00AA00;">&gt;</span>
	&lt;link rel<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> type<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> href<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;ie-only.css&quot;</span> /<span style="color: #00AA00;">&gt;</span>
&lt;!<span style="color: #00AA00;">&#91;</span>endif<span style="color: #00AA00;">&#93;</span>--<span style="color: #00AA00;">&gt;</span></pre></td></tr></table></div>

<p><b class="pink">NON-IE stylesheet</b></p>

<div class="wp_codebox_msgheader"><span class="right"><sup></sup></span><span class="left"><a rel="nofollow" href="javascript:;" onclick="javascript:showCodeTxt('p25code15'); return false;">View Code</a> CSS</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p2515"><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code" id="p25code15"><pre class="css" style="font-family:monospace;">&lt;!<span style="color: #00AA00;">&#91;</span>if !IE<span style="color: #00AA00;">&#93;</span><span style="color: #00AA00;">&gt;</span>
       &lt;link rel<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> type<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> href<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;not-ie.css&quot;</span> /<span style="color: #00AA00;">&gt;</span>
&lt;!<span style="color: #00AA00;">&#91;</span>endif<span style="color: #00AA00;">&#93;</span><span style="color: #00AA00;">&gt;</span></pre></td></tr></table></div>

<p><b class="pink">IE 7 only</b></p>

<div class="wp_codebox_msgheader"><span class="right"><sup></sup></span><span class="left"><a rel="nofollow" href="javascript:;" onclick="javascript:showCodeTxt('p25code16'); return false;">View Code</a> CSS</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p2516"><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code" id="p25code16"><pre class="css" style="font-family:monospace;">&lt;!--<span style="color: #00AA00;">&#91;</span>if IE <span style="color: #cc66cc;">7</span><span style="color: #00AA00;">&#93;</span><span style="color: #00AA00;">&gt;</span>
	&lt;link href<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;IE-7-SPECIFIC.css&quot;</span> rel<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> type<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span><span style="color: #00AA00;">&gt;</span>
&lt;!<span style="color: #00AA00;">&#91;</span>endif<span style="color: #00AA00;">&#93;</span>--<span style="color: #00AA00;">&gt;</span></pre></td></tr></table></div>

<p><b class="pink">IE 6 only</b></p>

<div class="wp_codebox_msgheader"><span class="right"><sup></sup></span><span class="left"><a rel="nofollow" href="javascript:;" onclick="javascript:showCodeTxt('p25code17'); return false;">View Code</a> CSS</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p2517"><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code" id="p25code17"><pre class="css" style="font-family:monospace;">&lt;!--<span style="color: #00AA00;">&#91;</span>if IE <span style="color: #cc66cc;">6</span><span style="color: #00AA00;">&#93;</span><span style="color: #00AA00;">&gt;</span>
	&lt;link rel<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> type<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> href<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;IE-6-SPECIFIC.css&quot;</span> /<span style="color: #00AA00;">&gt;</span>
&lt;!<span style="color: #00AA00;">&#91;</span>endif<span style="color: #00AA00;">&#93;</span>--<span style="color: #00AA00;">&gt;</span></pre></td></tr></table></div>

<p><b class="pink">IE 5 only</b></p>

<div class="wp_codebox_msgheader"><span class="right"><sup></sup></span><span class="left"><a rel="nofollow" href="javascript:;" onclick="javascript:showCodeTxt('p25code18'); return false;">View Code</a> CSS</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p2518"><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code" id="p25code18"><pre class="css" style="font-family:monospace;">&lt;!--<span style="color: #00AA00;">&#91;</span>if IE <span style="color: #cc66cc;">5</span><span style="color: #00AA00;">&#93;</span><span style="color: #00AA00;">&gt;</span>
	&lt;link rel<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> type<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> href<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;IE-5-SPECIFIC.css&quot;</span> /<span style="color: #00AA00;">&gt;</span>
&lt;!<span style="color: #00AA00;">&#91;</span>endif<span style="color: #00AA00;">&#93;</span>--<span style="color: #00AA00;">&gt;</span></pre></td></tr></table></div>

<p><b class="pink">IE 5.5 only</b></p>

<div class="wp_codebox_msgheader"><span class="right"><sup></sup></span><span class="left"><a rel="nofollow" href="javascript:;" onclick="javascript:showCodeTxt('p25code19'); return false;">View Code</a> CSS</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p2519"><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code" id="p25code19"><pre class="css" style="font-family:monospace;">&lt;!--<span style="color: #00AA00;">&#91;</span>if IE <span style="color: #cc66cc;">5.5000</span><span style="color: #00AA00;">&#93;</span><span style="color: #00AA00;">&gt;</span>
&lt;link rel<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> type<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> href<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;IE-55-SPECIFIC.css&quot;</span> /<span style="color: #00AA00;">&gt;</span>
&lt;!<span style="color: #00AA00;">&#91;</span>endif<span style="color: #00AA00;">&#93;</span>--<span style="color: #00AA00;">&gt;</span></pre></td></tr></table></div>

<p><b class="pink">IE 6 or lower</b></p>

<div class="wp_codebox_msgheader"><span class="right"><sup></sup></span><span class="left"><a rel="nofollow" href="javascript:;" onclick="javascript:showCodeTxt('p25code20'); return false;">View Code</a> CSS</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p2520"><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code" id="p25code20"><pre class="css" style="font-family:monospace;">&lt;!--<span style="color: #00AA00;">&#91;</span>if lt IE <span style="color: #cc66cc;">7</span><span style="color: #00AA00;">&#93;</span><span style="color: #00AA00;">&gt;</span>
	&lt;link rel<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> type<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> href<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;IE-6-OR-LOWER-SPECIFIC.css&quot;</span> /<span style="color: #00AA00;">&gt;</span>
&lt;!<span style="color: #00AA00;">&#91;</span>endif<span style="color: #00AA00;">&#93;</span>--<span style="color: #00AA00;">&gt;</span></pre></td></tr></table></div>

<h4>Internal CSS Browser hacks</h4>
<p>It&#8217;s not often that you&#8217;ll ever need to create an entirely separate stylesheet for a specific browser. Because as mentioned, in general, most competent CSS developers can create picture-perfect CSS without loading alternative stylesheets. </p>
<p>However, I must admit, I some times require 1 or 2 hacks to get things looking perfect. So, creating an entirely seperate stylesheet to fix 1 or 2 properties seems pointless to me. There are ways of creating &#8220;browser hacks&#8221; inside one stylesheet. While this method isn&#8217;t desirable, I find it useful and often more convenient if I&#8217;m only having one or two browser discrepancies.</p>
<p><b class="pink">IE-7 only</b></p>

<div class="wp_codebox_msgheader"><span class="right"><sup></sup></span><span class="left"><a rel="nofollow" href="javascript:;" onclick="javascript:showCodeTxt('p25code21'); return false;">View Code</a> CSS</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p2521"><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code" id="p25code21"><pre class="css" style="font-family:monospace;"><span style="color: #00AA00;">*+</span>html <span style="color: #cc00cc;">#div</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p><b class="pink">None IE-7 only</b></p>

<div class="wp_codebox_msgheader"><span class="right"><sup></sup></span><span class="left"><a rel="nofollow" href="javascript:;" onclick="javascript:showCodeTxt('p25code22'); return false;">View Code</a> CSS</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p2522"><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code" id="p25code22"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#div</span> <span style="color: #00AA00;">&#123;</span>
   _height<span style="color: #00AA00;">:</span> <span style="color: #933;">100px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p><b class="pink">Hide from IE 6 and lower</b></p>

<div class="wp_codebox_msgheader"><span class="right"><sup></sup></span><span class="left"><a rel="nofollow" href="javascript:;" onclick="javascript:showCodeTxt('p25code23'); return false;">View Code</a> CSS</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p2523"><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code" id="p25code23"><pre class="css" style="font-family:monospace;">html <span style="color: #00AA00;">&gt;</span> body <span style="color: #cc00cc;">#div</span> <span style="color: #00AA00;">&#123;</span>
      <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p><b class="pink">IE 6 and lower</b></p>

<div class="wp_codebox_msgheader"><span class="right"><sup></sup></span><span class="left"><a rel="nofollow" href="javascript:;" onclick="javascript:showCodeTxt('p25code24'); return false;">View Code</a> CSS</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p2524"><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code" id="p25code24"><pre class="css" style="font-family:monospace;"><span style="color: #00AA00;">*</span> html <span style="color: #cc00cc;">#div</span> <span style="color: #00AA00;">&#123;</span>
      <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>Does anyone else use any other CSS browser hacks?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brightcherry.co.uk/scribbles/2008/09/01/using-different-css-stylesheets-for-different-browsers/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
