<?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>Web Development by Joe Sak &#187; CSS</title>
	<atom:link href="http://www.joesak.com/category/programming/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.joesak.com</link>
	<description>Rails, HTML5, CSS3, jQuery - Thoughts, Advice &#38; Work</description>
	<lastBuildDate>Tue, 27 Jul 2010 14:10:14 +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>DotNetNuke Core Team all up in my Grill</title>
		<link>http://www.joesak.com/2008/06/03/dotnetnuke-core-team-all-up-in-my-grill/</link>
		<comments>http://www.joesak.com/2008/06/03/dotnetnuke-core-team-all-up-in-my-grill/#comments</comments>
		<pubDate>Tue, 03 Jun 2008 23:33:52 +0000</pubDate>
		<dc:creator>Joe Sak</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[DotNetNuke]]></category>
		<category><![CDATA[Improving Code]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Skinning]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.joesak.com/?p=64</guid>
		<description><![CDATA[Man, I&#8217;ve been getting quite a bit of attention from the DNN Core Team the past couple days. I just wanted to say I appreciate the feedback and I&#8217;m interested in the advancements and improvements being considered in upcoming versions of the platform. Thanks for putting up with my candor and overt angst in these [...]]]></description>
			<content:encoded><![CDATA[<p>Man, I&#8217;ve been getting <a href="http://www.joesak.com/2008/06/02/dotnetnuke-defaultcss-seriously/#comments">quite a bit of attention</a> from the DNN Core Team the past couple days.</p>
<p>I just wanted to say I appreciate the feedback and I&#8217;m interested in the advancements and improvements being considered in upcoming versions of the platform. Thanks for putting up with my candor and overt angst in these past few bitch posts.</p>
<p>I&#8217;d be particularly interested in knowing about any plans to move forward with .Net 3.5 and its ability to allow designers to define all the HTML in the controls. I&#8217;d like to see DNN reach the point where all rendered HTML is controlled by the front-end engineer, and we can achieve W3C compliance and simpler control over themes and content generation.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joesak.com/2008/06/03/dotnetnuke-core-team-all-up-in-my-grill/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DotNetNuke Default.CSS: Seriously??</title>
		<link>http://www.joesak.com/2008/06/02/dotnetnuke-defaultcss-seriously/</link>
		<comments>http://www.joesak.com/2008/06/02/dotnetnuke-defaultcss-seriously/#comments</comments>
		<pubDate>Mon, 02 Jun 2008 20:23:15 +0000</pubDate>
		<dc:creator>Joe Sak</dc:creator>
				<category><![CDATA[Artemis Solutions Group]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[DotNetNuke]]></category>
		<category><![CDATA[Improving Code]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ranting]]></category>
		<category><![CDATA[Skinning]]></category>
		<category><![CDATA[Venting]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Work Stuff]]></category>

		<guid isPermaLink="false">http://www.joesak.com/?p=63</guid>
		<description><![CDATA[Here&#8217;s another one of the myriad of reasons that I am displeased with DotNetNuke as a web development platform: The &#8220;default.css&#8221; included with all installs of DNN has this (and more CSS for other stuff like it) in it: H1 { font-family: Tahoma, Arial, Helvetica; font-size: 20px; font-weight: normal; color: #666644; } H2 { font-family: Tahoma, [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s another one of the <a title="DotNetNuke Sucks" href="/2008/04/23/why-dotnetnuke-is-terrible/">myriad of reasons</a> that I am displeased with DotNetNuke as a web development platform:</p>
<p>The &#8220;default.css&#8221; included with all installs of DNN has this (and more CSS for other stuff like it) in it:<br />
<code><br />
H1<br />
{<br />
font-family: Tahoma, Arial, Helvetica;<br />
font-size: 20px;<br />
font-weight: normal;<br />
color: #666644;<br />
}</code></p>
<p><code>H2<br />
{<br />
font-family: Tahoma, Arial, Helvetica;<br />
font-size: 20px;<br />
...</code></p>
<p>(I think you get the point)</p>
<p>Excuse me, DotNetNuke core team, but isn&#8217;t stuff like this up to the Designers and Developers? Why are you including a default stylesheet with definitions for HTML elements that would be used by Web developers? I can&#8217;t tell you how many times default.css has left me absolutely baffled about the smallest details not being quite right according to our design specs because it has these random &#8220;defaults&#8221; in it. It&#8217;s not up to DNN Core team to define my font families, sizes, and colors. And seriously, <a title="How to Set Font Sizing with CSS" href="http://www.alistapart.com/articles/howtosizetextincss/">stop using pixel font sizing</a>.</p>
<p>It&#8217;s becoming clearer to me almost on a daily basis, that DNN is not the right CMS for a professional Web shop to be using. They probably have this default.css for people who don&#8217;t make skins or know anything about Web development. And if you remove default.css, it completely hoses all the Admin pages and Control Panel. It takes way too much time and effort to figure out what&#8217;s removable and what&#8217;s not, and you always end up surprised when some random element isn&#8217;t positioned or styled correctly later on down the road.</p>
<p>It&#8217;s time for us to move on to a CMS that gives the developer full control over the theme, and not put a bunch of defaults in it that you can&#8217;t get rid of. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.joesak.com/2008/06/02/dotnetnuke-defaultcss-seriously/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>CFD Smile Goes Live!</title>
		<link>http://www.joesak.com/2007/11/12/cfd-smile-goes-live/</link>
		<comments>http://www.joesak.com/2007/11/12/cfd-smile-goes-live/#comments</comments>
		<pubDate>Tue, 13 Nov 2007 03:08:43 +0000</pubDate>
		<dc:creator>Joe Sak</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Clients]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Custom Development]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Portfolio - Freelance]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Semantic XHTML]]></category>
		<category><![CDATA[Skinning]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[Work Stuff]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.joesak.com/cfd-smile-goes-live/</guid>
		<description><![CDATA[Well, my first side project has finally gone live! After months of hard work, I now unveil www.cfdsmile.com to you. We wanted to bring out the services right up front for best emphasis, and lots of heavy stock photo usage for high impact. We also worked with a professional web content writer to make the [...]]]></description>
			<content:encoded><![CDATA[<p>Well, my first side project has finally gone live! After months of hard work, I now unveil <a href="http://www.cfdsmile.com/">www.cfdsmile.com</a> to you. We wanted to bring out the services right up front for best emphasis, and lots of heavy stock photo usage for high impact.</p>
<p>We also worked with a professional web content writer to make the content more effective and search-engine optimized. This, coupled with semantic HTML, CSS, and google web master tools, will help this site rank high in keywords for Texas Dental Services.</p>
<p>So, please visit the site if you get a chance, and enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joesak.com/2007/11/12/cfd-smile-goes-live/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Login Usability: Am I in or out?</title>
		<link>http://www.joesak.com/2007/08/01/login-usability-am-i-in-or-out/</link>
		<comments>http://www.joesak.com/2007/08/01/login-usability-am-i-in-or-out/#comments</comments>
		<pubDate>Wed, 01 Aug 2007 13:41:44 +0000</pubDate>
		<dc:creator>Joe Sak</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Feedback]]></category>
		<category><![CDATA[Improving Code]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Usability]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://www.joesak.com/login-usability-am-i-in-or-out/</guid>
		<description><![CDATA[UPDATE: After making this post, and refreshing the parallels forums page, I was presented with &#8220;Welcome, Joseph Sak&#8221; instead of a login prompt. So maybe I got it wrong, or they did, but this post still stands! The Parallels Forums recently got some redesign and information restructure, which all looks good and is organized quite [...]]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE:</strong> <em>After making this post, and refreshing the parallels forums page, I was presented with &#8220;Welcome, Joseph Sak&#8221; instead of a login prompt. So maybe I got it wrong, or they did, but this post still stands!<br />
</em></p>
<p><a href="http://forums.parallels.com">The Parallels Forums</a> recently got some redesign and information restructure, which all looks good and is organized quite well. But they&#8217;ve missed a couple really easy issues with their login functionality.</p>
<p><span id="more-47"></span></p>
<p>When you log into the Parallels Forums, it takes you to a &#8220;logging in&#8221; screen and redirects you back to where you were, which is fine, but what is this?!</p>
<h2>Am I logged in or out?</h2>
<p><img src="/images/logged-in-or-out.gif" alt="Am I logged in or out of Parallels Forums?" /></p>
<p>This is what you see in the top right of the forums after logging in. Apparantly, I&#8217;m logged in because I can start threads, but unless I click on the &#8220;+&#8221; symbol in the top left and opening a post-thread page, I have no visual cue that I am logged in.</p>
<p>Originally, with the old design, you saw your name and a &#8220;logout&#8221; link next to it. Or you could click your name to edit your profile. This was highly usable and gave immediate feedback to the user that yes, <strong>John Smith</strong>, you are logged in.</p>
<p>Now, Parallels, if you&#8217;re not willing to clean up that little mess, why are you making me erase &#8220;Login&#8221; from your textbox before typing my user name?</p>
<p><img src="/images/dont-erase-me-please.gif" alt="Why doesn't it disappear onclick?" /></p>
<p>You can solve this with a simple function.</p>
<p><code><br />
onclick="eraseInput();"</p>
<p>...</p>
<p>function eraseInput(){<br />
     if(this.value == "Login"){<br />
        this.value = "";<br />
     } else { return false; }<br />
}</p>
<p></code></p>
<p>Pretty simple usability points, and I can&#8217;t believe Parallels just got rid of them with their new design.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joesak.com/2007/08/01/login-usability-am-i-in-or-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Semantic XHTML &#8211; More than Table-less layouts</title>
		<link>http://www.joesak.com/2007/07/18/semantic-xhtml-more-than-table-less-layouts/</link>
		<comments>http://www.joesak.com/2007/07/18/semantic-xhtml-more-than-table-less-layouts/#comments</comments>
		<pubDate>Wed, 18 Jul 2007 19:24:52 +0000</pubDate>
		<dc:creator>Joe Sak</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Improving Code]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Semantic XHTML]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Work Stuff]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.joesak.com/semantic-xhtml-more-than-table-less-layouts/</guid>
		<description><![CDATA[OK so I have a confession to make. I didn&#8217;t know that semantic XHTML is different from standards-compliant XHTML. I formally apologize to the entire web development community. My terrible practice over the last seven years has finally caught up with me and put me in my place! I am deeply ashamed and will be [...]]]></description>
			<content:encoded><![CDATA[<p>OK so I have a confession to make. I didn&#8217;t know that semantic XHTML is different from standards-compliant XHTML.</p>
<p>I formally apologize to the entire web development community. My terrible practice over the last seven years has finally caught up with me and put me in my place!</p>
<p>I am deeply ashamed and will be making every effort to step up my game and read all about <a href="http://brainstormsandraves.com/articles/semantics/structure/">the wonderful world of semantic web development</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joesak.com/2007/07/18/semantic-xhtml-more-than-table-less-layouts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Project &quot;Marionette&quot; in the works</title>
		<link>http://www.joesak.com/2007/04/03/new-project-marionette-in-the-works/</link>
		<comments>http://www.joesak.com/2007/04/03/new-project-marionette-in-the-works/#comments</comments>
		<pubDate>Wed, 04 Apr 2007 04:03:44 +0000</pubDate>
		<dc:creator>Joe Sak</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Marionette]]></category>
		<category><![CDATA[Photoshop]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.joesak.com/design/new-project-marionette-in-the-works/</guid>
		<description><![CDATA[OK, so I know I haven&#8217;t worked on the veritas project in a long time, but I promise you it is because my client has been busy working a second job and we just haven&#8217;t been in touch on the matter lately. It&#8217;s no big deal, I&#8217;m not charging money for the project and there [...]]]></description>
			<content:encoded><![CDATA[<p>OK, so I know I haven&#8217;t worked on <a href="http://www.joesak.com/design/web-design-process-part-iii/">the veritas project</a> in a long time, but I promise you it is because my client has been busy working a second job and we just haven&#8217;t been in touch on the matter lately. It&#8217;s no big deal, I&#8217;m not charging money for the project and there is no strict deadline. I will be posting about that soon, though. I just got on him to purchase a domain and hosting solution so I can begin scripting the site. I will use <a href="http://www.joesak.com/design/shirock-photography-is-live/">wordpress and convert it into a CMS</a> just like I did for <a href="http://www.shirockphotography.com/">Shirock Photography</a>.</p>
<p>So, I am working on a new project, teaching myself cakePHP, and for now, it is codenamed &#8220;Marionette&#8221;. I&#8217;m very, very excited about this project and I hope to produce something in the coming weeks. Stay posted.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joesak.com/2007/04/03/new-project-marionette-in-the-works/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fix your Javascript Print Style Switcher for Internet Explorer</title>
		<link>http://www.joesak.com/2007/02/19/fix-your-javascript-print-style-switcher-for-internet-explorer/</link>
		<comments>http://www.joesak.com/2007/02/19/fix-your-javascript-print-style-switcher-for-internet-explorer/#comments</comments>
		<pubDate>Mon, 19 Feb 2007 21:08:03 +0000</pubDate>
		<dc:creator>Joe Sak</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.joesak.com/design/fix-your-javascript-print-style-switcher-for-internet-explorer/</guid>
		<description><![CDATA[So you&#8217;ve decided to use javascript to swap out a print style css sheet that basically hides a bunch of divs and maybe widens the content area. Perhaps your re-color the links and the text and fix the font sizes. You try it in Firefox and it prints perfectly, but when you print in IE, [...]]]></description>
			<content:encoded><![CDATA[<p>So you&#8217;ve decided to use javascript to swap out a print style css sheet that basically hides a bunch of divs and maybe widens the content area. Perhaps your re-color the links and the text and fix the font sizes.</p>
<p>You try it in Firefox and it prints perfectly, but when you print in IE, you&#8217;ll notice IE didn&#8217;t really print your printable version.</p>
<p>So you think, &#8216;Ok I&#8217;ll add media=&#8221;print&#8221; to my stylesheet link!&#8217; and then you refresh your page, try your Print this Page link, and nothing happens! And it still prints the wrong version! What to do?</p>
<p>Well, your old pal Joe here figured it out.</p>
<p>Here&#8217;s what you do:</p>
<ol>
<li>Create a separate stylesheet called print.css</li>
<li>Add this code to your master stylesheet:<br />
<code><br />
@media print {</p>
<p>@import "print.css";</p>
<p>}<br />
</code></li>
<li>Implement your javascript for making the stylesheet override your master stylesheet</li>
<li>Test</li>
<li>Enjoy!</li>
</ol>
<p>This allows you to switch to your print style so it is preview-able before printing and also tells IE to use print.css when it prints a page on your site. So incidentally, if a user just clicks print in IE without switching to your style, they will still get your printable version. I suppose this might cause confusion but considering the most reasons for making hard copies of digital information, it probably shouldn&#8217;t pose too much of a problem for your average user.</p>
<p>Now if your user wants to have a pretty print out of your website because they can&#8217;t access a computer to show it to someone else away from home, they&#8217;ll probably get stuck with the fact that IE does not print background images and colors by default any way.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joesak.com/2007/02/19/fix-your-javascript-print-style-switcher-for-internet-explorer/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>The Beauty of Standard Code</title>
		<link>http://www.joesak.com/2007/02/14/the-beauty-of-standard-code/</link>
		<comments>http://www.joesak.com/2007/02/14/the-beauty-of-standard-code/#comments</comments>
		<pubDate>Wed, 14 Feb 2007 22:06:26 +0000</pubDate>
		<dc:creator>Joe Sak</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Collaboration]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Teamwork]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.joesak.com/programming/the-beauty-of-standard-code/</guid>
		<description><![CDATA[Eric Puidokas used to be a coworker of mine, but now he works in Florida for the New York Times. While he was here, he developed a standard skin and css naming convention for us to use so we could easily jump into each others&#8217; code when need be to fix problems or implement redesigns. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.puidokas.com">Eric Puidokas</a> used to be a coworker of mine, but now he works in Florida for the New York Times. While he was here, he developed a standard skin and css naming convention for us to use so we could easily jump into each others&#8217; code when need be to fix problems or implement redesigns.</p>
<p>I recently had the opportunity to do just that. I had to put in a new design for a client based on roughly the same layout. Eric&#8217;s standard coding made it very simple, and a process that takes 4 to 5 hours from a blank sheet took about 1 hour with Eric&#8217;s code.</p>
<p>We use the same names for similar layout elements in every single web page we do. It goes kind of like this: (this list identifies common unique DIV IDs)</p>
<ul>
<li>Frame (main container)</li>
<ul>
<li>Header</li>
<ul>
<li>Nav (main nav bar)</li>
</ul>
<li>Sidebar (sub page nav bar)</li>
<li>Main &#8211; or &#8211; Content</li>
</ul>
<li>Footer</li>
</ul>
<p>So thanks to Eric for the great code, and let this be an encouragement to other development teams to use standard naming conventions for your CSS and HTML elements.</p>
<p><a href="http://www.joesak.com/files/standardsite.zip">Download a zipped example</a> of our standard code.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joesak.com/2007/02/14/the-beauty-of-standard-code/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CSS for IE 6 and 7 with no hacks</title>
		<link>http://www.joesak.com/2007/01/16/css-for-ie-with-no-hacks/</link>
		<comments>http://www.joesak.com/2007/01/16/css-for-ie-with-no-hacks/#comments</comments>
		<pubDate>Tue, 16 Jan 2007 05:22:04 +0000</pubDate>
		<dc:creator>Joe Sak</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.joesak.com/uncategorized/first-post/</guid>
		<description><![CDATA[UPDATE Since the time of this writing I have learned some important things: With correct doctypes, IE6 almost always renders the same as FFX and IE7, except when it comes to PNGs. If you set your body&#8217;s font-size to 62.5%, you reset browsers to 10px. Eric posted about this some time ago, but I really [...]]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE</strong><br />
Since the time of this writing I have learned some important things:</p>
<ul>
<li>With correct doctypes, IE6 almost always renders the same as FFX and IE7, except when it comes to PNGs.</li>
<li>If you set your body&#8217;s font-size to 62.5%, you reset browsers to 10px.</li>
</ul>
<hr />
<p>Eric <a href="http://www.puidokas.com/updating-my-css-for-ie7/">posted about this</a> some time ago, but I really think this is one of the most unique methods I use in my coding process. I&#8217;ve yet to see this idea brought up by most sites I browse for CSS/XHTML solutions. The idea is that you can use pure XHTML in conjunction with <a href="http://msdn.microsoft.com/workshop/author/dhtml/overview/ccomment_ovw.asp">conditional comments</a> to create a CSS style sheet that is free of your usual hacks. The reason we found this out is because the people on the IE 7 dev team actually managed to bring their new browser into closer range for compliant style rendering. IE 7, for the most part, follows the <a href="http://www.w3.org/TR/REC-CSS2/box.html">box model</a> pretty well, and ignores the usual string of hacks we use in our CSS.</p>
<p>Before we learned about conditional comments, we were using an underscore to rewrite any definitions that IE 6 needed to render our code correctly. The most common fix was usually to the width attribute. Add your padding back. Well, no more underscores. Here&#8217;s what you do:</p>
<p>When you create your body tag, write it as so:</p>
<p><code lang="xhtml"><!--[If lt IE 7]><br />
<body class="ie6"><br />
<![endif]--><br />
<!--[If IE 7]><br />
<body class="ie7"><br />
<![endif]--><br />
<!--<![If !IE]>--><br />
<body><br />
<!--<![endif]>--><br />
</code><br />
OK, so what is this mess, you wonder. This is code that only Internet Explorer since v5.5 understands. Microsoft did a good thing by adding this functionality so that web developers like us can fix our coding problems without hacks. Essentially here&#8217;s what it says in order from top to bottom:</p>
<p>If Less Than IE 7 then read: <code lang="xhtml"> <body class="ie6"> </code> If IE 7 then read: <code lang="xhtml"> <body class="ie7"> </code> If NOT IE, then read: <code lang="xhtml"> <body>  </code></p>
<p>Since the first two statements are commented out, all browsers except IE ignore the HTML inside the comments. The last statement is commented it out, as well, but the HTML:  is not. This is actually a twist on down-level revealed comments. The tags supplied by MS in the link above would have you use <code lang="xhtml"><![If !IE]></code>. This tag is not valid XHTML. All we did was put comments around it. IE still understands, and the code is perfectly valid. IE will skip that  tag, no other browser will. Everyone is happy.Here&#8217;s how you use it in CSS:One thing I noticed is font sizes in IE tend to be bigger than Firefox. Here&#8217;s what I usually do at the top of my CSS files:</p>
<p><code>body{<br />
font:normal 1em Arial, Helvetica, sans-serif; }<br />
body.ie6, body.ie7{<br />
font-size:0.9em;<br />
}<br />
</code></p>
<p>Starting my stylesheets with this declaration almost always guarantees my fonts will be the same size on Firefox, IE6, and IE7.</p>
<p>And of course, if you need to fix a width problem due to improper box model:</p>
<p><code> .bigdiv{<br />
width:140px;<br />
padding:0 5px;<br />
}<br />
body.ie6 .bigdiv{<br />
width:150px;<br />
} </code></p>
<p>Using body.ie6 as the parent selector will cause .bigdiv&#8217;s new width to only be implemented by IE 6.</p>
<p>You may read Eric&#8217;s post and notice he didn&#8217;t differentiate between IE 6 and 7 in his comments. Since his post, I&#8217;ve come to find that sometimes IE 6 needs fixing, sometimes IE 7 needs fixing, and sometimes they both do. That&#8217;s why I&#8217;ve chosen to differentiate between them in my body sub classes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joesak.com/2007/01/16/css-for-ie-with-no-hacks/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced)
Database Caching using disk

Served from: www.joesak.com @ 2010-09-08 01:49:41 -->