Question: CSS grid and flexbox are now becoming a more popular way to create page layouts. However, floats are still commonly used, especially when working with an older code base, or if you need to support older browser version. What are two valid techniques used to clear floats?

  1. Use the "clearfix hack" on the floated element and add a float to the parent element.
  2. Use the overflow property on the floated element or the "clearfix hack" on either the floated or parent element.
  3. Use the "clearfix hack" on the floated element or the overflow property on the parent element.
  4. Use the "clearfix hack" on the parent element or use the overflow property with a value other than "visible."

Answer: The correct answer of the above question is Option D:Use the "clearfix hack" on the parent element or use the overflow property with a value other than "visible."