CSS VERTICAL-ALIGN - CSS3 Examples

CSS VERTICAL-ALIGN

Written by jon on 11:20 PM
Element content is typically vertically centered on a rendered line (with extra line-height amounts distributed equally on the top and bottom.) This property allows in-line content boxes to be vertically aligned with respect to several different criteria on a rendered line.

Example
img.left { vertical-align: top }

<img style=”vertical-align: top” src=”image.gif” mce_src=”image.gif” >

Possible Values
Value Description
inherit Explicitly sets the value of this property to that of the parent.
baselinemiddle baseline - Aligns the baseline of the current element with the baseline of the parent element box. If the current element does not have a baseline, the bottom of the current element's box should be used.

middle - Aligns the vertical midpoint of the current element box with the baseline plus half the x-height of the parent.

topbottom top - Aligns the top of the current element with the top of the tallest element on the currently rendered line.

bottom - Aligns the bottom of the current element with the bottom of the lowest element on the currently rendered line.

text-toptext-bottom text-top - Aligns the top of the current element with the top of the parent element's font.

text-bottom - Aligns the bottom of the current element with the bottom of the parent element's font.

supersub super - The baseline of the current element box is aligned to the baseline of other superscripted elements in the parent element's box.

sub - The baseline of the current element box is aligned to the baseline of other subscripted elements in the parent element's box.

[length] This specifies an exact distance to raise or lower the current element from the default ‘baseline' value. Positive values are above the baseline, while negative values are below.
[percentage] This specifies a distance to raise or lower the current element from the default ‘baseline' value. Positive percentages are above the baseline, while negative values are below. The percentage value is relative to the current element's ‘line-height' property.

Related Posts by Categories



Widget by John | Interviewghost
  1. 0 comments: Responses to “ CSS VERTICAL-ALIGN ”

RECENT COMMENTS

SUBSCRIBE TO CSS3 EXAMPLES

 Subscribe to css3 Examples via RSS
Or, subscribe via email:
Find CSS3 Examples Entries :