+ 1

Whats the difference between the usage of verticale-align? Help please

please help.. I didnt understand the difference between the usage. please help I need it soon.

19th Jan 2017, 1:21 PM
Mehdi_AD
Mehdi_AD - avatar
3 Respostas
+ 9
vertical-align:middle; <- places an element at middle of Y axis of parent (works only for elements not for pure text)
19th Jan 2017, 1:33 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 3
Mainly, 'vertical-align' is used in context of the line of text, which have: - generaly a different height as ( mostly greater than ) the font height ( line-height and font-size in css ) - a reference line of writing ( the 'base line' ) which is above the bottom of the line-height for letters overpassing by down the base line - the line height is determined by the highest element present on the line So, when you verticaly align an element, you determine if they are place relatively to the bottom, the base-line, the middle or the top of the line height... Often, there's few differences between the differents alignment, since the line height grow up and contain more than one element different of text. The other context of css property 'vertical-align' is in <td> html element, the only container capable of a "true" vertical alignement: reference is no more the line height, but the content box :) In the past this have been used abusively to layout web pages, and was always advise against to doing it... But today, we can use this behaviour ( with some rules to know/follow ) on any element, with the 'table' family values of the css propertu 'display' ( 'table-cell' for the behaviour of a <td> element )...
19th Jan 2017, 6:41 PM
visph
visph - avatar
+ 1
Thank You Everybody
19th Jan 2017, 8:05 PM
Mehdi_AD
Mehdi_AD - avatar