Forum Moderators: not2easy
I'm making a menu bar with several drop down menus using CSS. I want this menu bar to be centered within the browser regardless of resolution, but when I center it, the drop downs display behind the content. The only way I've been able to get it to display above the content is to set it's position to absolute, but then I can't get it to center.
Am I missing something dumb here? Do you have to set your position to absolute to make the z-index work? If so, how do I use absolute positioning to center regardless of resolution?
There are two ways of centering a layer on a page, using javascript to read the available width of the page and dynamically writing the left: value; or using CSS itself! The latter was discussed recently here [webmasterworld.com].