View Full Version : Putting IE Fixes Inline

05-23-2005, 07:11 PM
Hey All,

Quick question. If I have the following CSS code:

#thirdRow {
width: 740px;
height: 125px;
float: left;
margin: 10px 0px 0px 10px;
padding: 0px;
/*border:1px solid #000;*/
/* for IE */
* html #thirdRow {margin-left:5px;margin-right:5px;}

How would I enter the IE fix (starting with * html) inline within the div tag itself? I'm trying to do this and can't get it to work.


Bill Posters
05-23-2005, 07:25 PM
Using inline css will only complicate things and clutter up the markup.
Consider using MSIE's conditional comments (http://www.quirksmode.org/css/condcom.html) for your MSIE fixes instead.
You could either embed them…

<!--[if IE]>
<style type="text/css">

#thirdRow {margin-left:5px;margin-right:5px;}


…or throw all the MSIE-specific 'fixes' into their own css file and use conditional comments around the style tags that import it.


<!--[if IE]>
<style type="text/css">

@import url(iefixes.css);


05-23-2005, 07:50 PM
Cool, thanks.

Yeah if I had it my way, everything would be within the stylesheet, but that's not the case. :)

Thanks again.