Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS IE7 picking up IE6 hack * html

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #29204

    Hi,

    Has anyone come across an issue in CSS where the IE7 browser picks up the IE6 hack (* html) and so renders the CSS assigned to IE6 rather than the CSS for IE7?

    I have used the following code:

    .maincontent{
    float: left;
    width: 600px;
    margin: 0px 0px 0px 25px;
    background-image: url(http://images.itc-uk.com/websiteimages/ … odybg1.gif);
    background-repeat: no-repeat;
    }

    * html .maincontent{
    float: left;
    width: 600px;
    margin: 0px 0px 0px 12px;
    background-image: url(http://images.itc-uk.com/websiteimages/ … odybg1.gif);
    background-repeat: no-repeat;
    }

    The styles in .maincontent are meant for Firefox and IE7 and the styles in * html .maincontent are meant for IE6, however the IE7 browser is picking up the styles in * html .maincontent and so is breaking the design. I have tried applying the * :first-child+html hack so as to apply styles only for IE7 however the browser is still pinking up the * html.

    I am an in-house designer for a UK based travel firm and this code is for an enewsletter.

    It appears that the IE7 browser has only started picking up the * html .maincontent styles today.

    Any help would be massively appreciated, as I’m starting to tear my hair out.

    Regards

    Gavin

    #76854
    virtual
    Participant

    Why don’t you just use an IE6 specific stylesheet?

    #76865
    Johnny
    Member

    If it is just that 1 block of code and you don’t want to use an IE6 specific style sheet you could use *+html which targets IE7 but i would recommend you use an IE6 stylesheet.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.