Answers for "17. With CSS, which property can prevent text and other elements from appearing next to a floated element?"

CSS
1

style rule that expands the element to cover any floating content within the element

.row {
	clear: both;
}

.row::after {
	clear: both;
	content: "";
	display: table;
}
Posted by: Guest on May-05-2020
0

Float element should has parent element that defined clear property.

<div>
  <div style="float: left;">Div 1</div>
  <div style="float: left;">Div 2</div>
  <div class="spacer" style="clear: both;"></div>
</div>
Posted by: Guest on August-31-2020

Code answers related to "17. With CSS, which property can prevent text and other elements from appearing next to a floated element?"

Browse Popular Code Answers by Language