homepage Welcome to WebmasterWorld Guest from 54.242.231.109
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

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




msg:1206654
 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?

 

BlobFisk




msg:1206655
 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.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved