CSS: clear floats on parent only

Yet again, I had a problem with CSS. For a project I'm working on I've build page with a sidebar that floats right of the main content (the sidebar and the main content are siblings). The main content contains several floating images. I want those images to clear existing floats because I don't want images next to each other.

Problem is that the images appear under the floating sidebar. There is a way to solve it. Just use overflow: auto on the main content. Yes, overflow: auto saved the day again!


No comments: