Reputation: 3
Is there away to change the default behavior of a div so that overflow:hidden causes the content to overflow out the right side of a div, rather than out of the bottom of the div?
Upvotes: 0
Views: 2422
Reputation: 15797
Yes. Have the text not wrap:
<div style="width:100px;height:30px; overflow:hidden; white-space:nowrap;">
Is there away to change the default behavior of a div so that
overflow:hidden causes the content to overflow out the right side
of a div, rather than out of the bottom of the div?
</div>
Upvotes: 2
Reputation:
Try white-space:nowrap
. That way the content won't wrap to a new line.
div{
overflow:hidden;
white-space:nowrap;
width:100px;
}
Upvotes: 3