On Apr 9, 2009, at 5:19 PM, Cristian Palmas wrote: > By the way, the "ex" measure unit in CSS does not exist for width. > You can > use, on second your needs: "px", "pt" (I recommend to use only for > print > styles), "%" or "em". > See http://www.w3.org/TR/CSS21/visudet.html#propdef-width for > further info.
That is incorrect. It is certainly possible to use 'ex' for width. the quote URL says: > Value: <length> | <percentage> | auto | inherit <length> brings us to http://www.w3.org/TR/CSS21/syndata.html#value-def-length > There are two types of length units: relative and absolute. Relative > length units specify a length relative to another length property. > Style sheets that use relative units will more easily scale from one > medium to another (e.g., from a computer display to a laser printer). > > Relative units are: > > * em: the 'font-size' of the relevant font > * ex: the 'x-height' of the relevant font > * px: pixels, relative to the viewing device Whether you'll get consistent results in browser is a different matter. On Windows, the ex unit is really broken in Safari 4b+/Chrome, well implemented in IE 8 (Vista and Win 7 only) and Gecko browsers. Opera always treated it as 1/2 em. On Mac, it is half-broken in Safari 4b+; it works fine in Gecko based browsers. As for the original question, as asked, that cannot be done in CSS – yet. Some kind of text-justify value would do, but atm not implemented in any browser. This maybe (future !): <http://www.w3.org/TR/css3-text/#text-justify> maybe some javascript trick might do. Philippe --- Philippe Wittenbergh http://l-c-n.com/ ______________________________________________________________________ css-discuss [cs...@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/