SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2006
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cross browser drop downs and conditional IE formatting

    Hi,

    Lots of the cross browser drop downs I see have a large amount of conditional formating for IE. Please see below:

    Code:
    <ul>
        <li><a href="#nogo">David<!--[if IE 7]><!--></a><!--<![endif]-->
            <!--[if lte IE 6]><table><tr><td><![endif]-->
            <ul>
            <li class="leaf"><a href="/user/david">my account</a></li>
                <li class="expanded"><a href="/blog" title="">Blogs<!--[if IE 7]><!--></a><!--<![endif]-->
                    <!--[if lte IE 6]><table><tr><td><![endif]-->
                    <ul>
                        <li class="leaf"><a href="/blog/david">my blog</a></li>
                    </ul>
                    <!--[if lte IE 6]></td></tr></table></a><![endif]-->
                </li>
            </ul>
            <!--[if lte IE 6]></td></tr></table></a><![endif]-->
        </li>
    </ul>
    Is it bad to use these conditional formatting statements or is this an acceptable way to immplment drop downs (along with css)?

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,807
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    I haven't found any situation where IE conditionals are required for anything except a few CSS fixes. Having it all through the HTML gives me the impression that the person didn't write their code correctly for modern browsers first and has tried to patch code written specifically for IE to work with other browsers rather than the easier way around.
    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="^$">


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
  •