user1739467
user1739467

Reputation:

Internet Explorer 9 doesn't display CSS Dropdown Menu's correctly...?

I am working on a CSS-based drop down navigation menu for a HTML webpage. It renders perfectly under Google Chrome, Mozilla Firefox, and Mobile Safari, the problem is Internet Explorer 9. Instead of displaying as a bar, it displays everything with bullets like a CSS script wasn't assigned to it. My HTML is the standard

    <link href="menu.css" rel="stylesheet" />

and

    <nav><ul><li><ul>ITEM_NAME<a href="LINKS"></ul></li></ul></nav>

format.

My CSS script looks like this:

    nav {
margin: auto; 
text-align: center;
    }

    nav ul ul {
display: none;
    }

nav ul li:hover > ul {
    display: block;
}


    nav ul {
background: #000;
list-style: none;
position: relative;
display: inline-table;
    }
nav ul:after {
    content: ""; clear: both; display: block;
}

nav ul li {
    float: left;
}
    nav ul li:hover {
        background: #FF6600;
    }
        nav ul li:hover a {
            color: #fff;
        }

    nav ul li a {
        display: block; padding: 10px 10px;
        color: #fff; text-decoration: none;
    }


nav ul ul {
    background: #000; padding: 0;
    position: absolute; top: 100%;
}
    nav ul ul li {
        float: none; 
        border-top: 1px solid #333;
                    border-left: 2px solid #333;
                    border-right: 2px solid #333;
        border-bottom: 1px solid #333; 
                    position: relative;
    }
        nav ul ul li a {
            padding: 10px 10px;
            color: #fff;
        }   
            nav ul ul li a:hover {
                background: #FF6600;
            }

nav ul ul ul {
    position: absolute; left: 100%; top:0;
}

Any ideas to what I need to do to make this render correctly in Internet Explorer 9? :) Thanks, Sean.

Upvotes: 1

Views: 1274

Answers (2)

Kai Mattern
Kai Mattern

Reputation: 3085

Not all versions of IE can understand the nav tag. There are some workarounds as detailled here:

html5 new elements (header, nav, footer, ..) not working in IE

Upvotes: 2

AtkinsSJ
AtkinsSJ

Reputation: 482

I'd said it's probably the display: inline-table; which IE isn't happy about. Could you use inline-block instead? Then to get rid of the dots, list-style: none

Upvotes: 0

Related Questions