The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › horizontal centered logo solution
I want to position a logo on the center of the screen ( every screen-size) and I’ve tried to position it like this :
#logo {position:absolute; top:0; left:50%}
and the container div like this:
#container:position:relative;width:100%;height:100%}
and it’s not working.
this might help.. https://css-tricks.com/snippets/css/absolute-center-vertical-horizontal-an-image/
Here you go: http://jsfiddle.net/EKUqK/1/
If the image size is static, I would think one of the easy ways is to set the width and height, display it block, and margin it auto.