Reputation: 115
I'm missing something really simple here. The scrollbar is appearing, but the knob that allows you to scroll is not showing up?
<div class="name">
<div class="name-scroll"> test
</div>
.name {
background: #EFEFEF;
box-shadow: 1px 1px 10px #999;
margin: auto;
text-align: center;
position: relative;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
padding-top: 5px;
overflow: hidden;
height: 100px;
}
.name-scroll {
background-color: lime;
overflow-x: scroll;
overflow-y: hidden;
height: 80px;
width: 10000px;
}
Here's the fiddle: http://jsfiddle.net/CnpL8/1/
Thanks!
Upvotes: 1
Views: 480
Reputation: 5647
You put the scrool on the wrong div:
.name {
overflow-x: scroll;
}
Upvotes: 0
Reputation: 14171
the overflow property should be set on the container, not on the containee.
.name {
background: #EFEFEF;
box-shadow: 1px 1px 10px #999;
margin: auto;
text-align: center;
position: relative;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
padding-top: 5px;
overflow: hidden;
height: 100px;
width: 300px;
overflow-x: scroll;
overflow-y: hidden;
}
.name-scroll {
background-color: lime;
height: 80px;
width: 10000px;
}
see: http://jsfiddle.net/CnpL8/2/
Upvotes: 3