+ 8

How do you vertically align tables in HTML and CSS?

The <center> tags only center it horizontally. margin-top: 50%; vertically centers the text most of the time, but not when the browser is resized. vertical-align: center; only vertically centers the text inside the table.

4th Oct 2018, 6:24 PM
Elijah D
Elijah D - avatar
2 Answers
+ 6
position:absolute ; margin:auto; left:0; right:0; top:0; bottom:0; In CSS.
4th Oct 2018, 8:03 PM
Roneel
Roneel - avatar
+ 6
Thanks Roneel 👍
5th Oct 2018, 2:00 PM
Elijah D
Elijah D - avatar