Discussion on vertical-align application _css/html

Source: Internet
Author: User

Comparison with the valign

Vertical-align's explanation in the Light Rain Handbook is to set or retrieve the vertical alignment of the object's contents. What I don't quite understand is that the vertical-align is in the category "Attributes/text."

O3noblog Special emphasis is the difference between vertical-align and valign, indeed vertical-align most applications should be in the TD, control the internal object position, and TD valign properties are very similar.

Valign a total of four parameters: Top, Baseline, bottom, middle, relatively vertical-align also have the same property values, the following is a comparison of TD control:



Use Vertical-align:top to avoid TD default Valign= "Middle" is a good choice, of course, can also use Vertical-align:middle, to the TD control, but certainly also invalid Div.

Effect Demo: http://www.rexsong.com/blog/attachments/20...1246_valign.htm

Comparison with the Align

Follow W3 's prompts to use vertical-align on inline objects, such as Control of IMG, which is similar to the Align properties of IMG.

Use the align= "Absmiddle" to control the absolute center of the IMG, you can also try to use the vertical-align:middle, and make a comparison to see more clearly:


So true absolute Center or align= "Absmiddle", which is irreplaceable with CSS.

Effect Demo: http://www.rexsong.com/blog/attachments/20...41444_align.htm

Inline apply

Used to determine the vertical position of the inline object, see two examples:

Small: http://www.rexsong.com/blog/attachments/20...ignmenttest.htm
Large: http:// Www.rexsong.com/blog/attachments/20...rticalalign.htm

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.