Brian Crescimanno wrote:
> On 6/20/07, Lyn Williams <[EMAIL PROTECTED]> wrote:
>
>> I have a problem centering a menu I have within a div. I have tried using
>> many methods but I get no luck.
>>
>
> have you tried:
>
> div#buttons ul{ width: XXXpx; margin: 0 auto; } where width is set
> equal to the menu's width?
>
Lyn,
I see you've taken Brian's advice and set a width. But I would recommend
you change its unit to ems, as setting a width in pixels ensures that
your buttons will drop down as soon as the text is resized, or any time
a user doesn't start with the font size you started with and designed for.
Alternately, you can avoid widths altogether by using display: inline
instead of float:
http://24ways.org/2005/centered-tabs-with-css
Zoe
--
Zoe M. Gillenwater
Design Services Manager
UNC Highway Safety Research Center
http://www.hsrc.unc.edu
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/