CSS1 Test Suite: 5.5.04 margin-left

The style declarations which apply to the text below are:

    .zero {background-color: silver; margin-left: 0;}
    .one {margin-left: 0.5in; background-color: aqua;}
    .two {margin-left: 25px; background-color: aqua;}
    .three {margin-left: 5em; background-color: aqua;}
    .four {margin-left: 25%; background-color: aqua;}
    .five {margin-left: -10px; background-color: aqua;}

This element has a class of zero.

This sentence should have a left margin of half an inch.

This sentence should have a left margin of 25 pixels.

This sentence should have a left margin of 5 em.

This sentence should have a left margin of 25%, which is calculated with respect to the width of the parent element.

- The left margin on this unordered list has been set to 25 pixels, and its background color has been set to gray.
- Another list item might not be such a bad idea, either, considering that such things do need to be double-checked. This list item has its left margin also set to 25 pixels, which should combine with the list's margin to make 50 pixels of margin, and its background color has been set to white.
- This is an unclassed list item

This element has a class of zero.

This paragraph has a left margin of -10px, which should cause it to be wider than it might otherwise be, and it has a light blue background. In all other respects, however, the element should be normal. No styles have been applied to it besides the negative left margin and the background color.

TABLE Testing Section
| This element has a class of zero. This sentence should have a left margin of half an inch. This sentence should have a left margin of 25 pixels. This sentence should have a left margin of 5 em. This sentence should have a left margin of 25%, which is calculated with respect to the width of the parent element. The left margin on this unordered list has been set to 25 pixels, and its background color has been set to gray. Another list item might not be such a bad idea, either, considering that such things do need to be double-checked. This list item has its left margin also set to 25 pixels, which should combine with the list's margin to make 50 pixels of margin, and its background color has been set to white. This is an unclassed list item This element has a class of zero. This paragraph has a left margin of -10px, which should cause it to be wider than it might otherwise be, and it has a light blue background. In all other respects, however, the element should be normal. No styles have been applied to it besides the negative left margin and the background color.