Results 1 to 4 of 4

Thread: Conditional Comments not working

  1. #1
    Registered
    Join Date
    Jan 2013
    Location
    United States
    Posts
    2
    Rep Power
    0

    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
    Registered
    Join Date
    Jan 2013
    Location
    United States
    Posts
    2
    Rep Power
    0
    I've seen this same setup work on other sites. Could this be a powweb problem? Anyone else have conditional statements working?

  3. #3
    Thinkin' out loud again Builder's Avatar
    Join Date
    Nov 2002
    Location
    Illinois
    Posts
    2,088
    Rep Power
    19
    I guess it all comes down to how hard you want to work to support obsolete browsers. The article you reference was originally written over 4 years ago when MSIE7 was the latest and "greatest" version of IE. IE6 was still extremely prevalent in corporate situations for various reasons.

    In 2013, we have come to this: IE8 is the WinXP browser, IE9 for Vista and up, and IE10 will be out soon. All of these, but especially 9+ are pretty standards compliant, assuming you write standards compliant HTML/CSS, and if you don't try to target certain quirks available only in IE.

    I can almost guaran-dang-tee you that if you look through your raw logs and search for hits from IE6 or IE7 or earlier, they will only be from scrapers, rogue bots, and referral spam. Yeah, your stats will say you had 400 hits (or whatever) this month from IE6, and even a few from IE2, but that's really just junk hits.

    Real people/users will be using IE8 and above, or a non-IE browser (Firefox, Safari, Chrome, et al). Do you really want to go to all that work to accommodate rogue "users" you really don't want anyway?

    I notice that you do web development, so a caveat to this is that if you are designing for an environment where the majority of users are on old versions of IE, then disregard the above. BUT, your "beta" site works pretty much the same for me on Chrome, IE8 (both WinXP) and on iPhone Safari.

    Speaking of iPhone. You would probably be far better served by concentrating on CSS for mobile browsers than ancient versions of PC browsers. That's the future. The few customers you lose by not accommodating old versions of IE will be more than made up for by the new customers wanting mobile versions of their sites.

    All this from a guy who hasn't redesigned his site since 2002, so take it all with a huge grain of salt.

    Good luck,
    Kevin
    A good friend will come and bail you out of jail...
    but a true friend will be sitting next to you saying,
    "Damn... that was fun!"

  4. #4
    Custom User Title tpoynton's Avatar
    Join Date
    Sep 2004
    Location
    Mass
    Posts
    2,177
    Rep Power
    17
    I'd start with the HTML and CSS validation errors.

Posting Permissions

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