Question

I have a problem with the position of an image on Safari with this page.

Firstly, on Chrome, Firefox and Internet Explorer the result is correct: Result on on Chrome, Firefox and Internet Explorer

But on Safari there is a problem : Result on Safari

There is the CSS :

span.boy_hand {
    background:url(../img/hand_png.png) no-repeat;
    height:35px;
    width:51px;
    position:fixed;
    top:470px;
    margin-left:-32px;
}

Can you tell me where it comes from?

Was it helpful?

Solution

Just use left property instead of margin-left to set the image at the right place. Different browsers will be left to guess differenty for position fixed element.So the bext pactice will be to include left and top properties for your element

    span.boy_hand {
background:url(../img/hand_png.png) no-repeat;
height:35px;
width:51px;
position:fixed;
top:470px;
left:32px;  /*  Set left property as per your need,I just simple reused your code */
 }
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top