Unfortunately, this doesn't center the element vertically, only horizontally. But if you just need to center the element horizontally, then just the margin trick will work just fine.
Btw, you don't need width: 100% in this code here, div is a block level element and has 100% width by default.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
That or our gold old margin (works in IE6) :)
Unfortunately, this doesn't center the element vertically, only horizontally. But if you just need to center the element horizontally, then just the margin trick will work just fine.
Btw, you don't need
width: 100%
in this code here,div
is a block level element and has 100% width by default.