I've got the following HTML structure:
%aside.sidebar
%main
%article
%h2
%aside.picture
%img
%p
%article
%h2
%aside.picture
%img
%p
(If you're not familiar with HAML: the structure above represents an HTML tree. %aside.picture
means <aside class='picture'>
.)
The sidebar is tall and is floated to the left.
Within articles, images are also floated to the left.
I would like to clearfix articles in such a manner that each article's height grows up to the bottom of its image, but not to the bottom of the sidebar.
Please have a look at a demo: http://sassmeister.com/gist/9173268
Note that the first article's clearfix made it grow as tall as sidebar is. But i only want it to grow as tall as the image.
PS overflow: hidden
does the trick, but lets assume that article contain popup elements that should be able to appear outside of their containers?