Prev | Current Page 295 | Next

Tommy Olsson and Paul O'Brien

"The Ultimate CSS Reference"

147). Note that even
for the top and bottom margins the percentage value will refer to the width of the
containing block. If the containing block??™s width depends on the element to which
percentage margins are applied, the resulting layout is undefined in CSS2.1.
Negative values are allowed for margins (although implementation-specific limits
may apply), and have the effect of pulling the element in the direction of the margin
Box Properties
201 Box Properties
specified. This may cause the element to overlap other elements, which may, of
course, be the desired effect. In cases where overlap occurs, we can determine the
elements??™ stacking levels by applying z-index values to them. In the case of
non-positioned or floated elements, a z-index only takes effect when a position is
set to relative for the elements, as a z-index can be applied only to positioned
elements.
Negative margins on floats are handled differently and the details are covered in
Floating and Clearing (p. 180).


Pages:
283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307