decimal numbers for padding and margin
Can I use decimal numbers (18.9
o开发者_如何学Pythonr 75.5
) for padding, margin or other styles? all browsers (such as IE5
, IE6
) support it?
Thanks.
As long as it's an EM measurement, I don't see why not. Not sure about IE5, but I'm pretty sure IE6 is supported for decimals. Any browser that supports EM.
Yes, they apply anywhere for measurements. They don't make a lot of sense if you're positioning something and using partial pixel measurements, but otherwise they're perfectly acceptable. Just remembe to specify the units. e.g.
height: 57; /* no units, will be treated as an error */
height: 57px; /* perfectly fine */
精彩评论