Home › Forums › CSS › CSS float problem › Reply To: CSS float problem
February 4, 2016 at 12:19 am
#237678
Participant
I like the way this image-gallery is responsive with using viewport-units, works well I think. Don’t know exactly if this is what you mean, but anyway; when the h4.year
should always stick to the most left-side, then it makes sense to clear everything that came before.
h4.year {
/* stuff */
clear: left;
}
Alternatively, one could use nth-child
selectors in mediaqueries, to clear floats after “a certain number of elements“.