SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Mar 2009
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    IE conditional not working

    OK so I'll try this again. I have given up on making the content scroll under my header in IE 6...so I have decided to go with an IE conditional to change style sheets and have the website appear in anything under IE 7 as the whole page scrolling with nothing fixed. I changed the code to reflect the new format and guess what....the conditional does nothing to the page in IE 6.

    Any suggestions? Here is the conditional I have added to the head portion.
    <!--[if lt IE 7]>
    <link rel="stylesheet" type="text/css" href="ie.css" />
    <![endif]-->

    The alternate design is a very simple two column with the left_panel float: left and the content with a margin:left greater than the width of the left_panel. The footer is set to clear both and the header set to position: relative.

    The order in the html is header, left_panel and finally content and then footer.

    It just seems to me that the conditional is doing nothing at all as the site is in the same condition as it was without the conditional...the content is way below the left_panel and of course the whole site scrolls. Thanks in advance for anyone who responds to this query.
    Dee

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,789
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Is the code in ie.css set up to make the necesary overrides to the styles alerady applied by the main stylesheet? Is the code AFTER the main stylesheet declaration where it can override it?
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  3. #3
    SitePoint Member
    Join Date
    Mar 2009
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes the ie.css code is after the text.css and the conditional is after that just before the </head>

  4. #4
    SitePoint Member
    Join Date
    Mar 2009
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Now wierd things are happening...the conditional has now upset the site in IE7 and FF. The left panel is fixed but the whole site is scrolling and the content is still dropping below the left panel. I thought a conditional, if set for a specfic browser version did not alter the other browsers and version it was not directed to.

    Someone else made mention of the * html hack. I tried this but I'm not sure I put it in the right place I had it in the original css. Should I have placed it in a separate css file and either placed that file after the original so as to over-ride with the * html hack or should I place it in a conditional?


Bookmarks

Posting Permissions

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