Whats the CSS to make something go to the next line in the page? [closed]
There are two options that I can think of, but without more details, I can't be sure which is the better:
#elementId {
display: block;
}
This will force the element to a 'new line' if it's not on the same line as a floated element.
#elementId {
clear: both;
}
This will force the element to clear the floats, and move to a 'new line.'
In the case of the element being on the same line as another that has position
of fixed
or absolute
nothing will, so far as I know, force a 'new line,' as those elements are removed from the document's normal flow.
Have the element display as a block:
display: block;
It depends why the something is on the same line in the first place.
clear
in the case of floats, display: block
in the case of inline content naturally flowing, nothing will defeat position: absolute
as the previous element will be taken out of the normal flow by it.