+ 1

Vertically centering a div in body?

17th Sep 2016, 3:05 PM
Richard Blackburn
Richard Blackburn - avatar
2 Antworten
+ 2
add this "margin: 0 auto" Example: <div style="width:200px; background-color:red; margin: 0 auto"> content </div>
30th Oct 2016, 8:25 PM
Hasan Al-Yazidi
Hasan Al-Yazidi - avatar
0
Add a class to the div and then use CSS to align it
17th Sep 2016, 3:59 PM
Ogochukwu Nduka
Ogochukwu Nduka - avatar