[ACCEPTED]-Cannot get horizontally-listed ul to overflow horizontally (and scroll)-html-lists
Accepted answer
If I understand correctly, this should be 2 it:
I've switched to using display: inline-block
(instead of float: left
), and 1 I'm using white-space: nowrap
to prevent wrapping.
ul {
width: 400px;
overflow-x: scroll;
background: #ccc;
white-space: nowrap;
}
li {
display: inline-block;
/* if you need ie7 support */
*display: inline;
zoom: 1;
}
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.