it depends if your div is in position: absolute / fixed or relative / static
for position: absolute & fixed
blblablbalba
The trick here is to have a negative margin half the width of the object
for position: relative & static
blblablbalba
for both techniques, it is imperative to set the width.