Home
Available

Welcome to Grubor Design Factory

I'm currently available for new challenges. Please be free to contact me and describe your project in details.

 
GDF Blog Menu
CategoriesArchives

Simple vertical align

Since vertical-align: middle doesn’t works quite well I’ll try to explain what is going on there.

Vertical align of text “doesn’t know” what is the height of a div in which he is sitting. So it sets text in the middle of a line height of text. All you have to do is to set line height as high as your div.

Here’s the result:

Your Text Goes Here

<br /> <div style="height: 100px; border: 1px dashed #333;"> <span style="line-height: 100px; vertical-align: middle">Your Text Goes Here</span> </div> <p>

No Comments

Add your own comment...

Back to Top
Back to Top