I have a div
that I would like to keep inline-block
but I want to keep any other elements from appearing on the same line as it.
- I know that
display:block
will clear all the elements after it. - I know that adding a
BR
tag will clear all the elements after it.
But I would rather use a style such as clear:both
except that only works for floating elements.
Is there a CSS style that I can use to clear all the elements after it while continuing to use inline-block
?
I've seen another similar question here but no one actually answered the question. I'm 100% not interested in alternatives such as using floats. There was one answer using CSS using content after but it does not work (link).
#Container:after {
content:"\a ";
white-space:pre;
}
Here is a link to an example on JSFiddle. I want to add a break after BorderContainer20016.
Let me repeat. I'm 100% not interested in alternatives such as using floats.