Avoid Using overflow to Contain Floats

suggest change

Values such as overflow: hidden and overflow: auto create a block formatting context, which incidentally contains floats. Using overflow for that side effect can clip shadows or positioned content, or introduce unwanted scrollbars.

Express the intent directly:

.float-container {
  display: flow-root;
}

Use Grid or Flexbox instead when the children are floated only to create columns.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents