Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    New to the CF scene
    Join Date
    May 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Internet Explorer li:hover doesn't work in IE9?

    Hello,

    I built some websites before IE9 came out,
    since im using/testing in IE9, the li:hover styles dont work anymore,
    also I try to trigger the UL submenu,
    by using this CSS:
    Code:
    #nav li:hover ul{
    	display: block;
    }
    The live example can be viewed here;
    http://www.ellytump.nl/

    both "Methoden" and "Consult" should popup submenus, and also the menu-options should change style on hover... but Doesnt do anything, and I cant figure it out.

    The complete CSS can be viewed here;
    http://www.ellytump.nl/css/style.css


    A similar setup, where the same setting DOES work in IE9 is;
    http://www.saedt.nl/

    I cant figure out what im doing wrong on ellytump.nl ...

    Did IE9 get more strict?

    Im breaking my head over this one,

    Thanks in advance!

  • #2
    New to the CF scene
    Join Date
    May 2011
    Location
    Washington State, USA
    Posts
    8
    Thanks
    1
    Thanked 1 Time in 1 Post
    Quote Originally Posted by jackdesign View Post
    Hello,

    I built some websites before IE9 came out,
    since im using/testing in IE9, the li:hover styles dont work anymore,
    also I try to trigger the UL submenu,
    by using this CSS:
    Code:
    #nav li:hover ul{
    	display: block;
    }
    The live example can be viewed here;
    http://www.ellytump.nl/

    both "Methoden" and "Consult" should popup submenus, and also the menu-options should change style on hover... but Doesnt do anything, and I cant figure it out.

    The complete CSS can be viewed here;
    http://www.ellytump.nl/css/style.css


    A similar setup, where the same setting DOES work in IE9 is;
    http://www.saedt.nl/

    I cant figure out what im doing wrong on ellytump.nl ...

    Did IE9 get more strict?

    Im breaking my head over this one,

    Thanks in advance!
    It appears that you need to specify a Doc Type. Browsers use doc types to know what rules apply.

    Here's the doctype I used to make it work:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    Hopefully this helps.

  • #3
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    he's on the right track but it should be declared as a HTML document not xhtml. also you used one ID twice on the page, thought you might want to know. see here-

    http://validator.w3.org/check?uri=ht...Inline&group=0

  • #4
    New to the CF scene
    Join Date
    May 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Wow, was it really THAT 'easy'.
    I was looking in a complete wrong direction!
    I've never researched the HTML doctype stuff.. and I never used it....

    So yeah.. IE9 got more strict haha,

    Thanks alot guys!! Really appreciate it.....

    Fixed the ID problem to, thanks.

    This was the first time I used a forum to solve a problem... probably not the last time...

    Have a nice day!

  • #5
    Senior Coder Rowsdower!'s Avatar
    Join Date
    Oct 2008
    Location
    Some say it's everything.
    Posts
    2,027
    Thanks
    5
    Thanked 397 Times in 390 Posts
    Quote Originally Posted by DanInMa View Post
    he's on the right track but it should be declared as a HTML document not xhtml. also you used one ID twice on the page, thought you might want to know. see here-

    http://validator.w3.org/check?uri=ht...Inline&group=0
    Meh, that's an argument for another day. There is nothing validation/presentation-wise that prohibits using xhtml doctypes when not serving xml (and it wouldn't break his layout to use it).

    It's just a bugaboo a lot of people have (for better or worse) much like using only unobtrusive javascript. They're both good ideas for polished work, but they certainly aren't mandatory.
    The object of opening the mind, as of opening the mouth, is to shut it again on something solid. –G.K. Chesterton
    See Mediocrity in its Infancy
    It's usually a good idea to start out with this at the VERY TOP of your CSS: * {border:0;margin:0;padding:0;}
    Seek and you shall find... basically:
    validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting

  • #6
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    Quote Originally Posted by Rowsdower! View Post
    Meh, that's an argument for another day. There is nothing validation/presentation-wise that prohibits using xhtml doctypes when not serving xml (and it wouldn't break his layout to use it).

    It's just a bugaboo a lot of people have (for better or worse) much like using only unobtrusive javascript. They're both good ideas for polished work, but they certainly aren't mandatory.
    This isn't true. XHTML and HTML have similar but discrete syntaxes. You should not use an HTML doctype with an XHTML document. If you're going to do that, why bother with a full doctype at all?

  • #7
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    Quote Originally Posted by Rowsdower! View Post
    Meh, that's an argument for another day. There is nothing validation/presentation-wise that prohibits using xhtml doctypes when not serving xml (and it wouldn't break his layout to use it).

    It's just a bugaboo a lot of people have (for better or worse) much like using only unobtrusive javascript. They're both good ideas for polished work, but they certainly aren't mandatory.
    it wasn't a philosophical observation. the rest of the page is not written to XHTML standard therefore it would be much simpler to declare the doctype as html otherwise if he wanted the page to be valid to W3 standard it would be less work to declare as HTML, that's all. Certainly he could declare it as xhtml but if he wanted a completely valid page he would have to make several other corrections. Sometimes folks just read stuff between the lines that just isn't there .

  • #8
    Senior Coder Rowsdower!'s Avatar
    Join Date
    Oct 2008
    Location
    Some say it's everything.
    Posts
    2,027
    Thanks
    5
    Thanked 397 Times in 390 Posts
    Quote Originally Posted by Apostropartheid View Post
    This isn't true. XHTML and HTML have similar but discrete syntaxes. You should not use an HTML doctype with an XHTML document. If you're going to do that, why bother with a full doctype at all?
    Using XHTML syntax in an HTML doctype'd document? That's not what I said at all. Apologies if that's how it came across. If the OP is taking a non-compliant document (which he had) and fixing it up using the validator (which he was advised to do) my argument was that he can do such validation with either doctype without breaking the page layout or being non-compliant.

    The main issue is that it validates. What exact doctype it validates to is not so important as to demand that it must be in HTML rather than XHTML. That was the point that I was trying to make. The post by DanInMa made it sound (to me) like it is an objective fact that this "should be" an HTML doctype - which of course would not be strictly true. From his response I see that's not at all how it was meant, but at the time that's not how it read to me.

    Quote Originally Posted by DanInMa View Post
    it wasn't a philosophical observation. the rest of the page is not written to XHTML standard therefore it would be much simpler to declare the doctype as html otherwise if he wanted the page to be valid to W3 standard it would be less work to declare as HTML, that's all. Certainly he could declare it as xhtml but if he wanted a completely valid page he would have to make several other corrections. Sometimes folks just read stuff between the lines that just isn't there .
    Whoops! Fair enough. I guess my sensor's set a bit too high today. Over the years I have seen so many posts complaining about the use of the XHTML doctype in documents not serving XML that I just expect that to be people's beef with the doctype. Sorry!
    The object of opening the mind, as of opening the mouth, is to shut it again on something solid. –G.K. Chesterton
    See Mediocrity in its Infancy
    It's usually a good idea to start out with this at the VERY TOP of your CSS: * {border:0;margin:0;padding:0;}
    Seek and you shall find... basically:
    validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting

  • #9
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts

    Cool

    Quote Originally Posted by Rowsdower! View Post
    U
    Whoops! Fair enough. I guess my sensor's set a bit too high today. Over the years I have seen so many posts complaining about the use of the XHTML doctype in documents not serving XML that I just expect that to be people's beef with the doctype. Sorry!
    Nahhhhh. I'm not a pro so I haven't reached that level of... Ill be nice and say exactness. . I was just tying to go with the path of less resistance in regards to him reaching a valid solution with a minimal of markup changes.


  •  

    Tags for this Thread

    Posting Permissions

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