in other words Safari sucks. I've tried using CSS to center and image both vertically and horizontally in Safari and it doesn't work in a responsive site. It will however work in FF, IE, Opera, and Chrome just fine. Well, actually you can statically center an image in Safari, but it will not be able to be responsive and scale with the window size and still be compatible with other browsers..
If you want to generically center an image you don't want to scale, you can use the following css:
We will pretend the image is 200wx100h pixels
<style type="text/css">
.exactCenter {
height:100px
width:200px;
position: fixed;
top:50%;
left:50%;
margin-left:-100px;
margin-top:-50px;
}
The margins left and right are a minus half the width and height of your image. the Html in the Body would be placed in a div with the class (.exactCenter
):
<div class="exactCenter"><img src="img/your image.jpg" name="Logo" width="100%" id="Centered Image"></div>
This should work in Safari for centering an image on screen both horizontally and vertically.