Reputation: 2174
I use bootstrap to have a responsive design and I want to center one div in the screen
I tested that :
style="position:fixed;top:50%;left:50%;"
but the top left corner of the div is in the center, I don't want put negative values of margin to make him reponsive
how an I solve this issue
Upvotes: 1
Views: 296
Reputation: 7159
To fix a div at the center use,
style="margin: 0 auto;"
It will align div at the center.
Upvotes: 1