Understanding CSS’s Vertical-align Property

Learn how to use this traditionally misunderstood property

The vertical-align property is one of those features of CSS that sounds pretty self-explanatory, but can cause problems for CSS beginners. It works only on inline or inline-block elements and table cells and when not used on a table cell, it will affect the alignment of the element itself, not the element’s contents.

 

The common misconception about vertical-align is that, when it’s applied to an element, it will make all the elements inside that element change their vertical position. For example, when using vertical-align: top on an element, it’s assumed that the contents of that element get pushed up to the top of the element.

Daniela Vaseva

Daniela VasevaDaniela is writing tutorials, news, newsletters, and update emails for the DMXzone specialising in the sphere of electronic processing, analysis and publication of texts, and interested in the development of new Internet technologies and problems related to the cyberculture and net literature. She has a bachelor's degree in Bulgarian philology, and a master's degree in computational linguistics.

See All Postings From Daniela Vaseva >>

Comments

Be the first to write a comment

You must me logged in to write a comment.