Internet Explorer for Windows versions up to and including 7 differ in their handling
of margin collapse from the CSS2.1 specifications. See Collapsing Margins (p. 148)
for a detailed analysis.
Internet Explorer for Windows versions up to and including 7 don??™t support the
value inherit.
margin-right
margin-right: { length | percentage | auto |
inherit } ;
This property defines the horizontal
distance from the right border edge of
the element concerned to the edge of its
containing block, or the element that??™s
horizontally adjacent to it.
If the element to the side is floated, or
absolutely positioned, the margin will
pass through it, because floats and
absolute elements are removed from the
flow. The margin will only be affected by static elements (or elements for which
position is set to relative, and which have no coordinates) in the normal flow of
the document??”this includes the containing block itself.
Example
This style rule assigns a margin of 20 pixels
to the right of paragraphs within the
element with ID "example":
#example p {
margin-right: 20px;
}
Refer to the sections on the CSS box model (p.
Pages:
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309