PDA

View Full Version : Chrome menu centering -- firefox versus IE



steveeyes
03-24-2007, 01:29 PM
Hi all

I love the chrome style CSS menu. It looks as if your forum may use the same menu.

In my attempt to adjust the code I made some changes to the css style sheet. Basically I did this:

body {text-align: center;}

.chromestyle{
margin-left:auto;
margin-right: auto;
text-align: left;
width: 98%;
font-weight: bold;
}


You can probably tell by the code that my document is 98% wide and I wanted to center the menu bar over the document.

In IE it looks perfect. In firefox it is slightly off. If you look at the page, you will see what I mean. In firefox notice the right edge does not seem flush. Here is the link

http://www.asian-lady.org


I'm a firefox fan and it is driving me crazy I can't get it to look as centered in firefox as it does in IE. Any suggestions would be appreciated.


Thanks Steve

ddadmin
03-24-2007, 09:19 PM
Warning: Please include a link to the DD script in question in your post. See this thread (http://www.dynamicdrive.com/forums/showthread.php?t=6) for the proper posting format when asking a question.

Inside your .css file, try changing the code in red:


.chromestyle ul{
border: 1px solid #BBB;
width: auto;

The code in red is new, modified from the original 100%. There may still be a little bit of flushing in Firefox- this is because your chrome menu contains an outside border (1px thick), which is added to the total width of the menu. While the total width of the menu now matches your table exactly (98% relative to the BODY), the border throws things off a big (98%+2px).

BTW, please note that your page is currently in violation of our usage terms, since the credit notice doesn't appear inline on the page. Please reinstate the credit notice: