How to make the outer div automatically the same height as its floating content with CSS?

Spread the love

To make the outer div automatically the same height as its floating content with CSS, we set the overflow property.

For instance, we write

#outerdiv {
  overflow: hidden;
}

to make the element with ID outerdiv hide any overflowing content with overflow: hidden;.

Leave a Reply

Your email address will not be published. Required fields are marked *