SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru
    Join Date
    Nov 2001
    Location
    Fort Lauderdale
    Posts
    814
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Using javascript to force IE 7-9 to properly parse CSS like modern browsers?

    Hello,

    Sorry if I posted this in the wrong forum section. I have read just been doing basic research and came across this script from a article I read here: (I needed a way to apply a style to li elements without it affecting the li elements of nested lists within each li. At the moment every li was being affected)

    - http://css-tricks.com/child-and-sibling-selectors/

    Here is the script:
    - http://code.google.com/p/ie7-js/

    The script doesn't seem to have been updated since 2010, but I was wondering whether anyone have utilized it and if there are any other known popular scripts that seem stable for a production site?

    Also on a side note, anyone know if the next IE version will finally properly use CSS?

    thanks in advance.

  2. #2
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Umm...what you want has been possible since IE 7. No script is needed. Also IE 8+ has the most complete implementation of CSS 2.1 as any other browser. (Just everyone is "Lets implement CSS3 before we even nailed down the previous version!!!")

    #some-id-on-ul-element > li { ... }

    You need to improve your research, IE has properly used CSS for a while now.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  3. #3
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,513
    Mentioned
    182 Post(s)
    Tagged
    6 Thread(s)
    As logic said the child selector has been supported since IE7 so there is no need for that script. I assume you are using a full doctype otherwise you will be in quirks mode and then the browser will behave much like ie5.

    (I needed a way to apply a style to li elements without it affecting the li elements of nested lists within each li
    You can do that anyway for IE6 by simply restating the original styles on the nested list.

    e.g.
    Code:
    li{background:red}
    li li {background:blue}


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
  •