1

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!

2 Answers 2

3

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/

Sign up to request clarification or add additional context in comments.

Comments

0

You put the scrool on the wrong div:

.name {
    overflow-x: scroll;
}

http://jsfiddle.net/CnpL8/3/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.