You may be familiar with the HTML ALIGN attribute which can be used with tags such as TABLE, TD, IMG. This attribute allows you to align elements horizontally. HTML also has a VALIGN attribute for aligning elements vertically.
There isn't actually a CSS ALIGN or CSS VALIGN property. Instead, CSS has the text-align which applies to inline content of block-level elements, and vertical-align property which applies to inline level and table cells.
CSS text-align example
td { text-align: right } The css text-align property applies to the contents of the block-level element - it doesn't need to be text. For more information on usage, see the text-align property page.
CSS vertical-align example
td { vertical-align: text-top } Note that at the time of writing, browser support for vertical-align was limited. For more information on usage, see the vertical-align property page.
No comments:
Post a Comment