wonker
10-29-2006, 09:35 AM
Hi ! Following my previous post about text sizing I'm trying to make my code better so that my site shows up well on linux as the linux default fonts are wider than the windows ones...
At the moment I've got a menu (made up of 5 li's set to inline) with a fixed width (580px) centered on the page (margin : 0 auto;).
But:
Although on windows it shows up fine, on linux the font is not the same and is wider. And the two end "li"'s go to a new line, which means that my menu's backound is only behing the first four and the last two are out of line !!
I can see only two solutions :
1) Don't use text anymore and replace the text by images
This is not the solution I would like to take !
2) Manage to make the menu's width adapt to the contents
Sound's easy but it only works if I set the float to the left, and there fore the menu is no longer centered...
Does anyone know how I could get around this, in other words how do you make a div with an automatic width that adapts to the wording that it contains that is centered on the page?
When it is set to align left or aglin right, it's ok but when it is not set or set to auto, the DIV takes up the whole width of the page and I do not want this.
At the moment I've got a menu (made up of 5 li's set to inline) with a fixed width (580px) centered on the page (margin : 0 auto;).
But:
Although on windows it shows up fine, on linux the font is not the same and is wider. And the two end "li"'s go to a new line, which means that my menu's backound is only behing the first four and the last two are out of line !!
I can see only two solutions :
1) Don't use text anymore and replace the text by images
This is not the solution I would like to take !
2) Manage to make the menu's width adapt to the contents
Sound's easy but it only works if I set the float to the left, and there fore the menu is no longer centered...
Does anyone know how I could get around this, in other words how do you make a div with an automatic width that adapts to the wording that it contains that is centered on the page?
When it is set to align left or aglin right, it's ok but when it is not set or set to auto, the DIV takes up the whole width of the page and I do not want this.
