HTML and CSS Reference
In-Depth Information
Figure 3.24 shows how the merged elements look in a browser. Note how the
level-four heading keeps its font size and family.
Figure 3.24: Creating a run-in heading to a paragraph
oVErFLoW
When working with content management systems and generated content, it
oten happens that the amount of content for an element may be more than
the element can accommodate. his is where the overflow property comes in
handy. he default value is visible for all elements, meaning that content visi-
bly overlows the edges of the element. he other permissible values are hidden ,
scroll , auto , and inherit . he value of hidden causes any excess content to be
clipped at the element's edges. No options are available that permit the reader
to see the clipped-of content.
he scroll value instructs the browser to allow the user to see content that
has overlowed the containing element. Browsers usually do this by providing
scrollbars and/or enabling swipe motions on touch-sensitive devices such as
iPads, e-readers, and tablet computers. he scroll value says to enable scroll-
ing whether overlow exists. he auto value, on the other hand, instructs the
browser to enable scrolling only if necessary.
FLoAT ANd CLEAr
Any HTML block element can be made to loat so that it moves to either the
let or right extent of its containing element, and the remaining content lows
around it. his is what happens with an image element that has its align attri-
bute set to either left or right . he containing element for a loated element is
its most recent ancestor element. he loated element retains its margins and
padding. For an element loated let, web authors typically set the let margin
 
 
 
Search WWH ::




Custom Search