View Full Version : Centering UL content and positioning in FF
mrmahoosive
11-16-2006, 04:50 PM
Yo,
Having a niggly little problem with this site: http://www.mahoosive.co.uk/eccl/
I would like the top menu to be centered, but can't figure it out. I've tried putting it in it's own div with margin: 0 auto; and text-align: center; but didn't work.
Also, in FF the top links don't appear in the right place, never really fussed about site not working in FF, our users don't have it. But would be nice to have it looking the same across the board.
Thanks in advance for anyone that can help..
Cheers
ak7861
11-16-2006, 05:42 PM
Use the vertical align property.
Try:
vertical-align: top;
mrmahoosive
11-16-2006, 06:35 PM
Tried that, and it doesnt sort it out in FF...
Any more ideas? It's been baffling me for ages now!
mrmahoosive
11-16-2006, 07:47 PM
Should really mention, that the centering issue is happening in IE (6&7)
cheers
mwinter
11-16-2006, 08:28 PM
http://www.mahoosive.co.uk/eccl/
I would like the top menu to be centered, but can't figure it out. I've tried putting it in it's own div with margin: 0 auto; and text-align: center; but didn't work.
You're floating both the anchors and the list items. Do neither. Remove the display property declaration within the "#top a" rule, and add a display declaration to the "#top li" rule with the value, inline.
Also, in FF the top links don't appear in the right place, never really fussed about site not working in FF, our users don't have it. But would be nice to have it looking the same across the board.
The ul element has a top margin.
In general, if you are going to fiddle with the margins for any element to effect a particular layout, remove all margins and padding
* {
margin: 0;
padding: 0;
}
and then add them where needed. This sidesteps differences between the default style sheets of various browsers.
Why do you have so many br elements, and why isn't that list of areas not marked-up as a list?
Mike
mrmahoosive
11-16-2006, 10:10 PM
br elements are through lazyness at the moment. i copied the text from a word doc hense the crap formatting at the moment.
they'll be sorted tomorrow.
Thanks for the help on that though, sorted it out like a treat.
Cheers,
James
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.