javascript - How do I get child elements to scroll with the width of the parent -


https://jsfiddle.net/9l503yyk/1/

what trying orange children extend beyond right of parent div. parent div scrollable right not , down. there dynamic heights going on jquery sortable children need stay visible vertically not horizontally.

very simple code have here.

<div class="parent">     <div class="child">asdf</div>     <div class="child">asdf</div>     <div class="child">asdf</div>     <div class="child">asdf</div>     <div class="child">asdf</div>     <div class="child">asdf</div>     <div class="child">asdf</div>     <div class="child">asdf</div> </div>  .parent {     overflow-x: scroll; } .child {     display: inline-block;     width: 200px;     background: orange;     margin: 5px;     box-sizing: border-box; } 

you can add white-space:nowrap; parent div.

see updated fiddle.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -