<?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>Tech Blog &#187; CSS</title>
	<atom:link href="http://www.kensfi.com/tag/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kensfi.com</link>
	<description>Home is where you hang your @</description>
	<lastBuildDate>Wed, 28 Jul 2010 03:30:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>4 ways to declare the CSS for IE</title>
		<link>http://www.kensfi.com/3-ways-to-define-the-css-for-ie/</link>
		<comments>http://www.kensfi.com/3-ways-to-define-the-css-for-ie/#comments</comments>
		<pubDate>Sun, 18 Apr 2010 16:02:41 +0000</pubDate>
		<dc:creator>Ken</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[IE6]]></category>
		<category><![CDATA[methods]]></category>
		<category><![CDATA[style]]></category>

		<guid isPermaLink="false">http://www.kensfi.com/?p=1904</guid>
		<description><![CDATA[In the last years I have been preoccupied of discovering of new methods for targeting IE when declaring the CSS and reducing as much as possible the amount of CSS code written for Internet Explorer and the number of external CSS files. I even tried to reduce all these external files to only one stylesheet [...]]]></description>
			<content:encoded><![CDATA[<p>In the last years I have been preoccupied of discovering of new methods for targeting IE when declaring the CSS and reducing as much as possible the amount of CSS code written for Internet Explorer and the number of external CSS files. </p>
<p>I even tried to reduce all these external files to only one stylesheet as Google started to add more weight to the page speed, in the last year especially &#8211; less CSS files = less server requests = good speed for loading the page.</p>
<p>I&#8217;d started (like everyone I guess) adding the style for IE in the header of the pages.</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;!--[if IE 6]&gt;<br />
&lt;style type=&quot;text/css&quot;&gt;<br />
.className {border:1px solid #999;}<br />
&lt;/style&gt;<br />
&lt;![endif]--&gt;</div></div>
<p>&#8230;and I moved along the way to created separately style files using the well know IE conditional declarations :</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;!--[if IE 6]&gt;&lt;link href=&quot;/assets/css/site-ie-6.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;&lt;![endif]--&gt;</div></div>
<p>After that I discovered another, interesting method, &#8211; the method of double declaration. E.g.:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">#divName {padding:10px 0 !important; padding:0 /*IE only*/}</div></div>
<p>Let me explain this a little. Since !important is not recognized by IE you can force one property to be used for FF and other modern browsers (aka Opera, Chrome, Safari) users and for the rest (which is IE obvious) you&#8217;ll have to declare it again with the desired parameter as in above example. The downsize of this method is that you you won&#8217;t have a perfect control, is addressing to all IE and you can&#8217;t target only a specific IE version.</p>
<p>But the most spectacular and revolutionist method which I just discovered (in fact my colleague, Steff, who&#8217;s writing about to <a href="http://www.modxrules.com/">how to setup a ModX  CMS website</a>, showed me this trick):</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;body&gt;<br />
&lt;!-- START IE6 open tag declaration--&gt;<br />
&lt;!--[if IE 6]&gt;&lt;div id=&quot;ie6&quot;&gt;&lt;![endif]--&gt;<br />
&lt;!-- END IE6 open tag declaration--&gt;<br />
<br />
&lt;div id=&quot;content&quot;<br />
&lt;p&gt;here is the entire html code. Everything will go inside of #ie6 wrapper in Internet explorer 6 only!. In this way you will have a new and easy way of targeting some of your DIVs adding #IE6 as parent&lt;/p&gt;<br />
&lt;/div&gt;<br />
<br />
&lt;!-- START IE6 end tag declaration--&gt;<br />
&lt;!--[if IE 6]&gt;&lt;![endif]--&gt;<br />
&lt;!-- END IE6 end tag declaration--&gt;<br />
&lt;/body&gt;</div></div>
<p>Possible style:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">#content p {width:960px; padding:10px 15px 3px}<br />
#ie6 #content p {width:960px; padding:10px 0 3px}</div></div>
<p>You can write a &#8220;beautiful&#8221; message also for readers who are still using IE6, something like this:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;!--[if IE 6]&gt;<br />
&lt;p&gt;Yo brother, Internet explorer 6 sucks! Get rid of it! Try Firefox!&lt;/p&gt;<br />
&lt;![endif]--&gt;</div></div>
<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.kensfi.com%2F3-ways-to-define-the-css-for-ie%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.kensfi.com%2F3-ways-to-define-the-css-for-ie%2F&amp;source=techSpin&amp;style=normal&amp;service=is.gd" height="61" width="50" /><br />
			</a>
		</div>
]]></content:encoded>
			<wfw:commentRss>http://www.kensfi.com/3-ways-to-define-the-css-for-ie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Indent First Line of Blog Paragraphs</title>
		<link>http://www.kensfi.com/how-to-indent-first-line-of-blog-paragraphs/</link>
		<comments>http://www.kensfi.com/how-to-indent-first-line-of-blog-paragraphs/#comments</comments>
		<pubDate>Sun, 19 Oct 2008 14:53:40 +0000</pubDate>
		<dc:creator>Ken</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[Tips and tricks]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[first line]]></category>
		<category><![CDATA[indent]]></category>
		<category><![CDATA[p tag]]></category>

		<guid isPermaLink="false">http://www.kensfi.com/?p=159</guid>
		<description><![CDATA[I&#8217;ve been running a while about this thing of indenting automatically the first line of the paragraph. Finally I solved this issue creating a new attribute for the &#60;p&#62; tag (paragraph tag). Is pretty simple to do this. Go to your css file, open it in notepad and add text-indent: 2em; Be sure the code [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been running a while about this thing of indenting automatically the first line of the paragraph. Finally I solved this issue creating a new attribute for the &lt;p&gt; tag (paragraph tag). Is pretty simple to do this.</p>
<p>Go to your css file, open it in notepad and add</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">text-indent: 2em;</div></div>
<p>Be sure the code you insert looks like this.</p>
<p>In my css, the p tag is the first and is looking in this manner:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">p {text-indent: 2em;}</div></div>
<p>The only thing remain is that you need to press enter twice to separate one paragraph from other in order to have the first line with indent.
<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.kensfi.com%2Fhow-to-indent-first-line-of-blog-paragraphs%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.kensfi.com%2Fhow-to-indent-first-line-of-blog-paragraphs%2F&amp;source=techSpin&amp;style=normal&amp;service=is.gd" height="61" width="50" /><br />
			</a>
		</div>
]]></content:encoded>
			<wfw:commentRss>http://www.kensfi.com/how-to-indent-first-line-of-blog-paragraphs/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>
