CSS vertical layout vertical-align

Source: Internet
Author: User

Definition

Vertical-alignAttribute Sets the vertical arrangement of elements.

Inheritance:No

Description

This attribute defines the vertical alignment between the baseline of an element in a row and the baseline of the row where the element is located. The negative length value and percentage value can be specified. This reduces the number of elements rather than increases. In table cells, this attribute sets the cell content alignment in the cell box.

Javascript syntax

CSS attributes can also be dynamically changed through a piece of JavaScript.

Script Syntax:

 
Object. style. verticalalign = "bottom"
Example
 
IMG {Vertical-align: Bottom ;}
Possible Value
Attribute Description
baseline default value. The element is placed on the base line of the parent element.
sub vertical alignment of text subscript.
super vertical alignment text superscript.
top align the top of the element with the top of the highest element in the row.
text-top align the top of the element with the top of the parent element font.
middle place the element in the middle of the parent element.
bottom align the top of the element with the top of the lowest element in the row.
text-bottom align the bottom of the element with the bottom of the parent element font.
length set the stacking sequence of elements
% use the percentage value of the "line-height" attribute to sort this element. Negative values are allowed.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.