HTML and CSS Reference
In-Depth Information
other. For this reason, we recommend specifying rule width as a per-
centage of the window width. That way, when the width of the browser
window changes the rules retain their same relative size.
The width attribute is deprecated in HTML 4 and XHTML because you can
achieve its effects with appropriate use of stylesheets. The align attribute
The align attribute for a horizontal rule can have one of three values:
left , center , or right . For those rules whose width is less than that of
the current text flow, the rule will be positioned accordingly, relative to
the window margins. The default alignment is center .
A varied rule alignment makes for nice section dividers. For example,
the following source alternates a 35-percent-wide rule from right to cen-
ter to the left margin (see Figure 5-5 ):
Figure 5-5. Varying horizontal rule alignment makes for
subtle section dividers
Search WWH ::

Custom Search