Previous Message
Next Message

How to set equal widths on an unknown number of items?

Sent by Philippe Wittenbergh on 6 March 2010 06:06


On Mar 6, 2010, at 6:16 AM, John Beales wrote:

> So is there a pure-CSS way, (as opposed to having the CMS calculate
> widths and set them inline), that we all know of to get this done?

Assuming you are using an unordered list, you can try display:table

ul {display: table, table-layout:fixed;}
li {display:table-cell;}

(but forget about IE 7...)

Philippe
---
Philippe Wittenbergh
http://l-c-n.com/





______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
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/
Previous Message
Next Message

Message thread: