Implementation (CSS)Clear (both)

Learn about how Cascading Style Sheets (CSS) can be used to style web pages.

Part ofComputing ScienceWeb design and development

Clear (both)

Floating elements continue down the page until we use a property called clear.

If we wanted three elements <headline> , <navigation> and <main> to remain unaffected by any float properties elsewhere in the page, we need to use clear:both.

headline, navigation, main {display:block; clear:both}