22.12.2013 Views

W3C CSS2 Cascading Style Sheets, level 2 - instructional media + ...

W3C CSS2 Cascading Style Sheets, level 2 - instructional media + ...

W3C CSS2 Cascading Style Sheets, level 2 - instructional media + ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Contents<br />

11 Visual effects<br />

11.1 Overflow and clipping . . . . . . . . . . . 145 .<br />

11.1.1 Overflow: the ’overflow’ property . . . . . . . 145 .<br />

11.1.2 Clipping: the ’clip’ property . . . . . . . . 147 .<br />

11.2 Visibility: the ’visibility’ property . . . . . . . . . 149 .<br />

11.1 Overflow and clipping<br />

Generally, the content of a block box is confined to the content edges of the box.<br />

In certain cases, a box may overflow, meaning its content lies partly or entirely<br />

outside of the box, e.g.:<br />

A line cannot be broken, causing the line box to be wider than the block box.<br />

A block-<strong>level</strong> box is too wide for the containing block. This may happen<br />

when an element’s ’width’ property has a value that causes the generated<br />

block box to spill over sides of the containing block.<br />

An element’s height exceeds an explicit height assigned to the containing<br />

block (i.e., the containing block’s height is determined by the ’height’ property,<br />

not by content height).<br />

A box is positioned absolutely [p. 113] .<br />

It has negative margins [p. 85] .<br />

Whenever overflow occurs, the ’overflow’ property specifies how (and whether)<br />

a box is clipped. The ’clip’ property specifies the size and shape of the clipping<br />

region. Specifying a small clipping region may cause clipping of otherwise visible<br />

contents.<br />

11.1.1 Overflow: the ’overflow’ property<br />

’overflow’<br />

Value: visible | hidden | scroll | auto | inherit<br />

Initial: visible<br />

Applies to: block-<strong>level</strong> and replaced elements<br />

Inherited: no<br />

Percentages: N/A<br />

Media: visual<br />

This property specifies whether the content of a block-<strong>level</strong> element is clipped<br />

when it overflows the element’s box (which is acting as a containing block for the<br />

content). Values have the following meanings:<br />

145

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!