CSS1 Test Suite: 5.5.25 float


[Previous] [Next] [Section] [Contents] [Specification]
Last Updated: 11 May 1998

The style declarations which apply to the text below are:

.one {float: left;}
.two {float: right;}
.three {float: none;}
.four {float: left; width: 50%;}


This text should be flowing past a tall red rectangle on the left side of the browser window. In this case, it is the image which has been floated to the left.



This text should be flowing past a tall red rectangle on the right side of the browser window. In this case, it is the image which has been floated to the right.



This paragraph should float left, because its width is set to 50%.

This paragraph should flow past the previous paragraph in the usual manner, just as it would for an image.



This paragraph should NOT float left, because an unspecified width defaults to 100% and nothing can flow past an element which is as wide as its parent. Therefore, a red square should be seen AFTER the paragraph, not next to it.



This paragraph should float left, because its width is set to 50%. The image should appear to the right of the paragraph.


This text should be flowing past a tall red rectangle on the left side of the browser window. In this case, it is the image which has been floated to the left.



This text should be flowing past a tall red rectangle on the right side of the browser window. In this case, it is the image which has been floated to the right.



This paragraph should float left, because its width is set to 50%.

This paragraph should flow past the previous paragraph in the usual manner, just as it would for an image.



This paragraph should NOT float left, because an unspecified width defaults to 100% and nothing can flow past an element which is as wide as its parent. Therefore, a red square should be seen AFTER the paragraph, not next to it.



This paragraph should float left, because its width is set to 50%. The image should appear to the right of the paragraph.



[Previous] [Next] [Section] [Contents] [Specification]