homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld

Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: DrDoc

CSS Forum

Centering Drop Downs in a Menu Bar
CSS troubles with centering and display

 4:05 pm on Apr 1, 2003 (gmt 0)

Dumb question I'm sure, bear with me.

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?



 4:29 pm on Apr 1, 2003 (gmt 0)

Hi rdoyle720,

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].

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved