Prev | Current Page 289 | Next

Tommy Olsson and Paul O'Brien

"The Ultimate CSS Reference"


However, it??™s acceptable to set both min-width and width when their values are
given in different units:
#example {
min-width: 3em;
width: 138px;
}
As the min-width is based on em units, at some stage, due to text resizing (for
example), the em width may be larger than the 138px width we??™ve set. In cases such
as this, the element will be allowed to expand further than the 138px width, thus
accommodating the resizing of the em-based text.
Box Properties
197 Box Properties
If the contents of a block require more horizontal space than is afforded by the limits
that have been set, the behavior is defined by the overflow (p. 280) property.
Value
The property takes a CSS length (px, pt, em, and so on), or a percentage. Negative
length values are illegal.
Percentage values refer to the width of the element??™s containing block. If the
containing block??™s width is negative, the used value is zero.
Compatibility
Opera Safari Firefox Internet Explorer
9.2 3.0 2.0 1.3 2.0 1.5 1.


Pages:
277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301