edit: this problem was already fixed and this question was already answered by myself, but it was not marked as answered because I couldn't mark my own answer as accepted.
I'm trying to make a div with horizontal scroll only, and I achieved this by using spans with white-space:no-wrap within a div with overflow-x:scroll. The problem is that I can't use paragraphs with wrapping text within these spans, because it breaks the layout in Chrome.
These are what I want (works on FF) and what I've got on Chrome: http://img682.imageshack.us/img682/5070/brokenhorizontalscroll.png
(sorry, I couldn't use images)
The problem happens every time a paragraph text wraps inside the spans...
This is my html/css:
<style>
.info {
width: 250px;
height: 200px;
float: left;
}
.list {
height: 200px;
overflow-x: scroll;
overflow-y: hidden;
white-space: nowrap;
}
.item {
height: 175px;
width: 175px;
display: inline-block;
margin-left: 5px;
overflow: hidden; /* without this, the layout breaks in FF too */
}
.item * {
white-space: normal;
}
</style>
<div id="listOne red">
<div class="info blue">
<p>info regarding this list of itens</p>
</div>
<div class="list orange">
<span class="item yellow">
<p>text</p>
<p>more text, in another line, now wrapping</p>
<p>and etc and etc</p>
</span>
<span class="item yellow">
[...]
more itens
[...]
</div>
<div class="clear"></div>
</div>
Does someone know how to fix this? Or does someone know another way to make this div with horizontal scroll? (I'm using fluid layout, so my orange div does not have a fixed width)
Thanks in advance.