I want to set a span element to appear below another element using the display property. I tried applying inline-block but without success, and figured I could use block if
I had this issue, I solved it like so:
.parent {
white-space: nowrap;
display: table;
}
.child {
display: block;
}
the "white-space: nowrap" makes sure that the children of the child(if it has any) don't wrap to new line if there is not enough space.
without "white-space: nowrap" :
with "white-space: nowrap" :
edit: it seems that it also just works without the child block part for me, so just this seems to work fine.
.parent {
white-space: nowrap;
display: table;
}