I need to hide horizontal overflow of a html element but not the vertical overflow. So assume I have the following HTML:
<div class="container">
<div class="inner">
<p>content 1</p>
</div>
<div class="inner">
<p>content 2</p>
<p> and then some more stuff</p>
</div>
</div>
The CSS I wanted to use was something like:
.container{
overflow:hidden;
width:100px;
}
.inner{
width:200px;
}
The problem I have is that the element div.container will have zero height because I have not defined a height in the CSS. However the height of the content in the container could be variable and therefore I cannot set a specific height.
I could use JavaScript to dynamically set the height of the element but I would like to avoid doing this.