Why margin:2.5px
does not work? at one situation in my code i want to give margin:2.5px
in IE6 conditional CSS to solve IE double margin and my default css has margin:5px
but in IE6 css margin:2.5px
and margin:2px
creating same margin. then how to get same margin
on both browser?
This is code of default screen CSS
#newsHeadline LI
{font-weight: bold;
list-style-position: inside;
font-size: 13px;
margin: 5px 0px;
width: 320px;
line-height:
normal; list-style-type: disc;
position: relative}
this is css code in conditional i'm writing #newsHeadline LI {margin: 2.5px 0px}
Edit: 15 feb
if margin:2.5px does not work then how to get same margin in both browser IE and FF? Is there any other way?
While plenty of people have suggested that the pixel is indivisible, and therefore a fractional pixel value makes no sense, the CSS standard does not actually rule out fractional values. Indeed, it suggests that when a high-resolution device is used, a CSS pixel unit should be mapped to a larger number of device-specific elements. My reading is therefore that 2.5px
should not be explicitly wrong, just that you might not be able to rely on it to do something useful, especially, I might say, in Internet Explorer.
Because px
is the smallest unit possible. U really can't divide one display point
, can you?
Edit: AS for your problem, if there is no interference with background (i.e. different color), you can try setting padding
instead of margin for IE6
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With