PDA

View Full Version : how can i center a menu?



orit_v2003
Nov 15th, 2006, 10:40 AM
Hi!

I have just started working with css and I have stumbled on a few problems.

I want to build a simple centered menu, but I don't know how to center it.

I need it to work on Explorer and Firefox.

This is the page:
Html:
http://www.bterezin.org.il/test/index7.htm

Css:
http://www.bterezin.org.il/test/design7.css

This is a print screen on how it looks on Explorer and on Firefox:
http://www.bterezin.org.il/test/explorer.jpg
http://www.bterezin.org.il/test/firefox4.jpg

On both browsers the menu is not centered but on firefox it really looks different and terrible.

Why is the menu going right?

I marked on firefox4.jpg what i mean when i say the menu is not centered. (look at the firefox4.jpg it will explain)
(Why is the font bigger on firefox?)

Thank you
Orit.

VIPStephan
Nov 15th, 2006, 03:31 PM
There's a default left padding with lists and stuff. Put a border around your ul to see where it is and what happens. I always do for example:


#navcontainer ul {border: 1px solid red;}

and when I'm done I remove this border.

Try to set padding-left: 0; for that ul and see how it works.

orit_v2003
Nov 16th, 2006, 10:14 AM
Thank you very much!!!!!!

I tried to ask this question in many forum and no one gave me a good answare.

This solved my problem.

Thanx.