Quantcast
Channel: Doowebs - Development and design of pages and web applications - Doowebs - Development and design of pages and web applications - Displaying items by tag: html
Viewing all articles
Browse latest Browse all 2

Vertical alignment or centered vertically using DIV

$
0
0

I have always encountered the problem of vertically align a div to avoid having to be modifying the padding when the text size is too long and takes up two rows ... well here I leave the point of how to make this automatic alignment as it we do when we use a table ... and it is through css ...

.contenedor{display:table;height:500px}
.contenido-a-centrar{display:table-cell;vertical-align:middle;}
<div class="contenedor">
<div class="contenido-a-centrar">
TEXT THAT ALWAYS GIVES PROBLEMS AND WANT VERTICAL CENTER
</div>
</div>

Viewing all articles
Browse latest Browse all 2

Trending Articles