7.3k views
1 vote
Example 4-1: The styles for the main content of an HTML document main { clear: left; } main h1 { font-size: 170%; } main h2 { font-size: 130%; } main p.indent { text-indent: 2em; } main a.date_passed { color: gray; } (Refer to example 4-1) What does the clear property do?

1 Answer

1 vote

Answer:

The clear property stops floating of the main element to the right of the preceding block elements

Explanation:

The clear property specifies that which sides of the elements floating element are not allowed to be float.

It returns or sets the positions of an element in relation to the floating objects. If an element can be fitted horizontally in space next to other elements which is floated.

Syntax:

clear: none | left | right | both | initial;

User Spaceman
by
6.1k points