On Wed, Jan 25, 2012 at 11:58 AM, Tim Dawson <t...@ramasaig.com> wrote: > I'm having my first crack at an HTML5 site using some of the new elements. > It's all at an early stage, but I'm trying to iron out a few problems with > the menu. > > http://www.mull-bed-and-breakfast.co.uk/temp/ > > My client wants a horizontal menu centred on the page, holding (at the > moment) seven list items. I'm trying to use 'margin: 0 auto;' on the NAV > element to do this, but struggling because the width of this element may > vary according to the number of list items (and the length of their text, > padding, etc.). > > I'm also trying to use max- and min-width to ensure that the list items > display on two lines, but this seems to cause trouble with the padding being > ignored (see the 'Special Occasions' item). > > I see no reason why the NAV element should behave any differently from a > DIV, and perhaps it doesn't, but you'll see it's not quite centred. I've > floated the List Items so they all close up nicely in a horizontal line, and > floated the UL so that it expands to contain all the List Items. > > I have a feeling I'm not seeing the wood for the trees, and if anyone can > point me in the right direction I'd be grateful. > > Regards, > > Tim Dawson > > -- > Tim Dawson > Maolbhuidhe > Fionnphort > Isle of Mull PA66 6BP > > 01681 700718 > > ______________________________________________________________________
I feel like the nav element is centered on the page, but what's centering the UL? I don't see what's holding the ul in the position it's in... I may just be wandering in the same woods... -- Tom Livingston | Senior Interactive Developer | Media Logic | ph: 518.456.3015x231 | fx: 518.456.4279 | mlinc.com ______________________________________________________________________ css-discuss [css-d@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/