html - Responsive table with fixed header -
i want make responsive table show 2 sections time, labels , values.
the labels fixed , data slider.
so far have this:
[class^=col] { float: left; } .row { width: 100%; overflow: hidden; } .frame { overflow: scroll; } .col-6 { width: 50%; } .col-12 { width: 100%; } .sub-row { border: 1px solid; height: 30px; } .sub-row:first-child { font-weight: bold; }
<div class="row"> <div class="col-6"> <div class="sub-row"></div> <div class="sub-row">test1</div> <div class="sub-row">test2</div> </div> <div class="col-6"> <div class="col-12"> <div class="sub-row">col1</div> <div class="sub-row">bla</div> <div class="sub-row">bla</div> </div> <div class="col-12"> <div class="sub-row">col2</div> <div class="sub-row">bla</div> <div class="sub-row">bla</div> </div> </div> </div>
but notice data being displayed 1 below each other. want displayed side side, hidden in panel can slide it. how can this?
here can see working example:
this acheived using flexbox
thead, th{ display:flex; }
Comments
Post a Comment