vertical-align CSS property for ?Is the purpose of the
vertical-align property similar to the HTML align attribute ?
align HTML 3.2 attribute
The attributealign (deprecated in HTML4) belongs to img, applet, object tags, and defines the position of those elements with respect to its context.This attribute can assume values:
bottom, middle, top, left and right, the default value is bottom.The bottom, middle, top values concern the object's position with respect to surrounding text.
The left and right values cause the element float to the left or right margin.
The align attribute also appears in td elements of tables.
vertical-align CSS property
Thevertical-align CSS property specifies the vertical alignment of inline elements.This attribute can assume values:
baseline, middle, top, bottom, text-top, text-bottom, etc. The default value is baseline. In typography the baseline is an imaginary line where letters sit upon.
With the baseline value inline elements will be lined up with text at baseline of text. The value
middle aligns all elements with the mean line of text. The text-bottom and text-top values align elements with the lowest point text's descenders goes down to and with the highest point the text reach. The values top and bottom work with the highest and lowest points of inline non-textual elements on the line.
Example
In the form on the linked page, textarea and input texts are lined up using the CSS propertyvertical-align set to middle:http://libreriamusicale.altervista.org/contacts.html
The
vertical-align property can also be applied to table cells elements.
No comments:
Post a Comment