tags:

views:

25

answers:

1

Hello
There is difference between webkit and the other browsers in one absolute positioned element margin.
So how to set another margin for the webkit browsers in the css?
Thanks!

A: 

Sometimes these problems can be avoided with experience by structuring your surrounding markup and CSS differently, but if that doesn't work or isn't possible in this instance you can use the following CSS hack:

/* CSS properties for all browsers */
#yourObject { position: absolute; left: XXXpx; top: YYYpx; }

/* CSS overrides for webkit browsers: Safari 3+, Chrome 1+ */
@media screen and (-webkit-min-device-pixel-ratio:0) {
 #yourObject  { left: LLLpx; top: TTTpx;  }
}
mVChr