Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jul 2003
    Posts
    600
    Thanks
    17
    Thanked 0 Times in 0 Posts

    Putting IE Fixes Inline

    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.

    Thanks.

  • #2
    Senior Coder
    Join Date
    Feb 2003
    Posts
    1,665
    Thanks
    0
    Thanked 27 Times in 25 Posts
    Using inline css will only complicate things and clutter up the markup.
    Consider using MSIE's conditional comments for your MSIE fixes instead.
    You could either embed them…

    Code:
    <!--[if IE]>
    <style type="text/css">
    
    #thirdRow {margin-left:5px;margin-right:5px;}
    
    </style>
    <![endif]-->
    …or throw all the MSIE-specific 'fixes' into their own css file and use conditional comments around the style tags that import it.

    e.g.
    Code:
    <!--[if IE]>
    <style type="text/css">
    
    @import url(iefixes.css);
    
    </style>
    <![endif]-->

  • #3
    Regular Coder
    Join Date
    Jul 2003
    Posts
    600
    Thanks
    17
    Thanked 0 Times in 0 Posts
    Cool, thanks.

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

    Thanks again.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •