html - HTML5 CSS Horizontally Scrolling multiple dynamic number of columns -


i having problem getting div scroll horizontally. div has dynamic number of columns can go on 100% width of page. currently, have total width set fixed px width (1500px) horizontal scrolling. however, number of columns dynamic, div should grow fit new columns in, , not hide new columns below div.

here fiddle of page stripped down: https://jsfiddle.net/razzledazzle/jpj2cuo7/5/ can see last input in column visible 'last 1 visible'. next column input 'new kanban list not visible'.

how can change div#board-container width 100% instead of 1500px , still scroll horizontally? it's similar layout trello or meistertask.

div#main-kanban {   top: 49px;   position: absolute;   bottom: 0;   right: 0;   left: 0;   bottom: 52px; }  div#content-kanban {   position: absolute;   left: 0;   right: 0px;   overflow: hidden;   height: 100%;   overflow-x: auto;   background: #e3e3e3; }  div#board-container {   width: 1500px;   top: 49px;   position: absolute;   height: 100%;   overflow: hidden; }  section#kanban-board {   top: 0;   bottom: 0;   right: 0;   left: 0;   position: absolute;   margin-bottom: 49px; }  div.kanban-individual {   display: inline-block;   vertical-align: top;   width: 320px;   overflow-y: scroll;   height: 100%;   float: left;   background-color: #e3e3e3;   cursor: pointer;   -webkit-transition: background 0.3s linear;   -moz-transition: background 0.3s linear;   -o-transition: background 0.3s linear;   -ms-transition: background 0.3s linear;   transition: background 0.3s linear; } 

thanks @ketan , @carol mckay pointed me on right path. managed working needed setting height 100% , using display:flex on div#board-container.

here working fiddle

the working css:

div#main-kanban {     top: 49px;     position: absolute;      right: 0;     left: 0;     bottom:52px; }  div#content-kanban {     position: absolute;     left: 0;     right: 0px;     overflow: hidden;     height: 100%;     overflow-x: auto;     background: #e3e3e3; }  div#board-container {     width: 100%;     display: -webkit-box;      /* old - ios 6-, safari 3.1-6 */     display: -moz-box;         /* old - firefox 19- (buggy works) */     display: -ms-flexbox;      /* tweener - ie 10 */     display: -webkit-flex;      display:flex;     height:100%; }  section#kanban-board {     margin-bottom:49px;     display: -webkit-box;      /* old - ios 6-, safari 3.1-6 */     display: -moz-box;         /* old - firefox 19- (buggy works) */     display: -ms-flexbox;      /* tweener - ie 10 */     display: -webkit-flex;      display:flex; }  div.kanban-individual {     display: inline-block;     vertical-align: top;     width: 320px;     overflow-y: scroll;     float: left;         background-color: #e3e3e3;     cursor: pointer;     -webkit-transition: background 0.3s linear;     -moz-transition: background 0.3s linear;     -o-transition: background 0.3s linear;     -ms-transition: background 0.3s linear;     transition: background 0.3s linear; } 

the concern have lack of browser compatibility ie 8-10 , older webkit browsers. i've added browser hacks per this page , still won't work right old ies.


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -