I am currently working on creating a dropdown menu using only CSS.
Check out this example I'm using:
http://jsfiddle.net/DEK8q/8/
My next step is to center the menu, so I added position-relative like this:
#nav-container {
position: relative;
float: left;
left: 50%;
}
#nav {
***position: relative;***
float: left;
left: -50%;
font: bold 12px SimHei, Arial, Helvetica, Sans-serif;
border: 1px solid #121314;
overflow: hidden;
}
However, I've encountered an issue where positioning the nav relatively causes the second level of the menu not to display!
This problem arises from a display boundary for relatively positioned divs.
I aim to resolve this and center align the menu using just CSS. Any suggestions on how to overcome this challenge?