Phil
It seems that just dividing 100 by the number of elements will not work. Try
this
ul {list-style-type: none;
text-align:center;
margin-left: 1%;
margin-right: 1%;
}
li {
background-color: white;
display:block;
width: 24.5%;
text-align: center;
float: left;
padding: 0;
margin: 0;
}
Although the menu does not stretch across entire screen, it is in the centre
and doesn't wrap to next line in IE. If you don't put the margin-left,
margin-right instructions, it is not centred
Hope this helps.
Cheers
Ian
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Phil Wilson
Sent: 01 December 2005 11:09
To: [email protected]
Subject: [css-d] Horizontal lists in IE and Firefox
Hi all,
I have an unordered list with four elements. I'd like to align them
horizontally, with each list-item taking up 25% of the screen (or
their container).
I would have thought this was quite simple, and produced
http://philwilson.org/code/tests/horizontallist.html which renders
fine in Firefox and Opera, but in IE the last list-item wraps to the
next line.
Can someone tell me either where my code is wrong, or which IE bug I'm
suffering from? I'm sure I've done this before, so there must be a
workaround.
Many thanks,
Phil
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.13.10/189 - Release Date: 30/11/2005
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.13.10/189 - Release Date: 30/11/2005
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/