I'm trying to get a better understanding of the CSS "overflow" property. In the following example I see overflow:hidden;
but the gray background is visible and reaching to the full 300% of the div
width.
If the overflow is "hidden" I would expect the background to be clipped, not visible. If I change it to "visible" the gray background disappears entirely. I'm confused by this and hope to get a solid understanding of it.
Can someone describe what is happening with the two options? Which element is actually "overflowing"?
I found the above example from a previous question Properties on CSS overflow
If you have an element that has overflow set to something different than "visible", the height of the element will be expand according to the float elements inside.
I gather in this case the width of the element is expanding. However, semantically it makes no sense. If an object is "visible" I expect it to be visible, not hidden, and vice-versa.