0

I have this set up:

<div>
    <div>
    </div>
    <div>
    </div>
    <div>
    </div>
</div>

the inner divs has this CSS:

float: left; 
margin-right: 40px;
width: 100px;

the outer divs have this:

overflow-x: scroll;
height: 275px;
width: 300px;

The divs contain a list of input checkboxes. I want them to keep sliding right and then a horizontal scrollbar show. instead, the div's wrap. So now they are vertical and I am scrolling vertically instead. How can I make them keep going to the right?

2 Answers 2

1

Make the items Inside the overflow Container Display:inline-block and add white-space:nowrap; to the scrolling Container.

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

1 Comment

Did you remove the floatings?
1

Try floating the inner divs to the left too, or try setting their display to inline-block.

Option A:

float: left;
overflow-x: scroll;
height: 275px;
width: 300px;

Option B:

display: inline-block;
overflow-x: scroll;
height: 275px;
width: 300px;

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.