Reply to Re: CSS drop down menu - how to centre it?

Your name:

Reply:


Posted by Jonathan N. Little on 10/24/06 18:57

Ben C wrote:
> On 2006-10-24, Jonathan N. Little <lws4art@centralva.net> wrote:

>>> text-align: center doesn't centre the floats (as of course it shouldn't)
>>> hence the idea of making the <ul> a shrink-to-fit centered block box.
>> That's why I did float the LI's.
>
> You mean "didn't".
>
Yes, that's what I meant. Gotta proof read!

>> The problem is that the UL element
>> expands to 100% width so your cannot center by setting the left and
>> right margins to auto as with other blocks. To make it work you have to
>> set an absolute width on the UL. Best to use 'em' so it scale with the
>> font, but the design will break if you add another menus item...
>
>> You could set the UL to "display: table" but that leaves IE out of the
>> picture.
>
> I thought the OP said it worked in IE?
>

No he actually wrapped the UL in a TABLE element

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация