SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jan 2013
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Conditional Comments not working

    I've been trying to encorporate Paul Irish's take on conditional styles here:
    http://paulirish.com/2008/conditiona...nswer-neither/

    I have been banging my head against the wall for a few hours trying to figure this out. I thought maybe someone here could point out something obvious I'm missing.

    I've specified the conditional statements here:
    http://web-freeze.com/new/about.html
    Code:
    <!--[if lt IE 7]><html class="ie6" lang="en"><![endif]-->
    <!--[if IE 7]><html class="ie7" lang="en"><![endif]-->
    <!--[if IE 8]><html class="ie8" lang="en"><![endif]-->
    <!--[if gt IE 9]><!--><html><!--<![endif]-->
    The corresponding ie6, ie7, ie8 classes are in my css stylesheet:
    http://web-freeze.com/new/styles/webfreeze.css
    Code:
    .ie6 #sidebar nav,
    .ie7 #sidebar nav,
    .ie8 #sidebar nav {
    	background-color: #d5d2c9;
    	border: 1px solid #b5b2ac;
    }
    I also tried manually putting in the styles inside the conditional statements here. That doesn't appear to be working either.

    Anyone see anything out of place?

    Thanks,
    DG

  2. #2
    Mouse catcher silver trophy
    Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,822
    Mentioned
    110 Post(s)
    Tagged
    1 Thread(s)
    Remember that older versions of IE don't recognise elements introduced in HTML5, and unlike other browsers they assume that if they don't recognise it then it doesn't exist ... so you can't expect older versions of IE to style <nav> elements without a bit of help. I'm not an expert, but I couldn't see anything that obviously looked like an HTML5 Shim ... if you're missing that then it would explain why the CSS isn't working.


Tags for this Thread

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
  •