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 really understand is that the vertical-align is in the category "Properties/Text"

O3noblog Special emphasis is the difference between vertical-align and valign, indeed vertical-align most applications should be within the TD, control the internal object location, and TD's Valign attribute is very similar.

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



Use Vertical-align:top; To avoid TD default Valign= "Middle" is a good choice, of course, you can also use Vertical-align:middle, to the TD control, but the div is certainly not valid.

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

comparison with the align

Following W3 's hints, using vertical-align on an inline object, such as an IMG control, is similar to the Align property of IMG.

Use the align= "Absmiddle" control img Absolute Center, you can also try to use the vertical-align:middle, and make a comparison to see more clearly:


So the true absolute Center or align= "Absmiddle", which is not replaceable using CSS.

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

inline applications

To determine the vertical position of an inline object, see two examples:

Small Picture: http://www.rexsong.com/blog/attachments/20...ignmenttest.htm
Big Picture: http://www.rexsong.com/blog/attachments/20...rticalalign.htm

  • 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.