Vertically center align an element using CSS
Vertically center align an element using CSS
Vertical alignment is difficult to find a solution. But I will tell you a simple way to align a div vertically center. The CSS property youre going to use for this purpose is vertical-align.
Here is the code of a div aligned vertically.
Here is the code of a div aligned vertically.
#adiv{This only works for div with the display property inline-block and some others which I dont know. But its better to use inline-block.
display:inline-block;
vertical-align:middle;
}
download file now