css - How can I get overflow:scroll inside a flex box -


i have buildt layout:

<!doctype html> <html> <head> <meta charset="utf-8"> <title>test</title> <style type="text/css"> html, body{   margin:0;   padding:0;   height:100%; } .flex{   display:flex;   flex-direction:column;   min-height:50%;   width:33.3333%;   float:left;   border:1px solid #c8c7cc;   box-sizing:border-box;   overflow:scroll; } .flex:last-child{   width:66.6666%; } </style> </head>  <body> <div class="flex">     <ul>         <li>1</li>         <li>2</li>         <li>3</li>         <li>4</li>         <li>5</li>         <li>6</li>         <li>7</li>         <li>8</li>         <li>9</li>         <li>10</li>         <li>11</li>         <li>12</li>         <li>13</li>         <li>14</li>         <li>15</li>         <li>16</li>         <li>17</li>         <li>18</li>         <li>19</li>         <li>20</li>         <li>21</li>         <li>22</li>         <li>23</li>         <li>24</li>         <li>25</li>     </ul> </div> <div class="flex">  </div> <div class="flex">  </div> <div class="flex">  </div> <div class="flex">  </div> </body> </html> 

i want put long lists of things inside each flex box. need them scroll individually , @ same time fill available space in browser window. have managed latter how can flex box scroll instead of grow when overflowed?

i kept on searching after posting question , found post: flexbox , vertical scroll in full-height app using newer flexbox api

it suggested setting parent elements height 0. tried , seems working :d


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 -