IE7 CSS site major display issue

Discussion in 'CSS' started by CanaryWoolf, Jun 16, 2006.

  1. #1
    Hi I've just downloaded IE7 Beta2 and checked my site www.cavaliermailing.com and my jaw dropped - It does not diplay any of the main body of the site: Can anyone help?

    [​IMG]
     
    CanaryWoolf, Jun 16, 2006 IP
  2. CanaryWoolf

    CanaryWoolf Peon

    Messages:
    114
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I guessing it might be something to do with star html hacks used in the css:
    eg

    /* the bodge for IE6 browsers */
    * html .minwidth {border-left:777px solid #fff; position:relative; float:left; z-index:1;}
    * html .container {margin-left:-777px; position:relative; float:left; z-index:2;}

    If so what is the solution?

    CW
     
    CanaryWoolf, Jun 16, 2006 IP
  3. CanaryWoolf

    CanaryWoolf Peon

    Messages:
    114
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    For the time being I've kind of taped over the crack with an additional hack which covers IE6 & IE7 issues

    Not ideal maybe but I'm damned if I'm going to spend too much time on it only for Microsoft to move the goal posts.

    CW
     
    CanaryWoolf, Jun 17, 2006 IP
  4. FeelLikeANut

    FeelLikeANut Peon

    Messages:
    330
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You should switch to conditional comments. For example:
    <!--[if IE]>
    <link href="iehacks.css" type="text/css" rel="stylesheet" media="screen">
    <![endif]-->
    Code (markup):
    Unlike hacks, this will not break with new browser versions. You can even target particular versions.
    <!--[if IE 7]>
    Code (markup):
     
    FeelLikeANut, Jun 17, 2006 IP
  5. CanaryWoolf

    CanaryWoolf Peon

    Messages:
    114
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks - I ended up having to to that in any case.

    For some reason you can't double up on the hacks:

    * html .minwidth, *+html .minwidth  
    Code (markup):
    I ended up with the * html hack in the main style sheet (for IE 6and below) and *+html hack (for IE7) in an ie7.css, with this conditional statement :

    
    <!--[if !lte IE 6]>
    <link rel="stylesheet" href="css/ie7.css" type="text/css" media="screen" />
    <![endif]-->
    Code (markup):
     
    CanaryWoolf, Jun 18, 2006 IP