html - Two different colored columns inside parent container -
how can style .playing, .time-before, , .time-after , divs .time-before , time-after divs split .playing div equal width columns , fill container height.
live link: https://riot-controls.herokuapp.com/
html:
<li each={ queue } onclick={ play }> <span>{ title }</span> <span>{ artist }</span> <span>{ stringifytime(length) }</span> <div class='time-before'></div> <div class='time-after'></div> </li>
css:
.playing { color: orange; } .playing > .time-before { background-color: green; display: inline-block; height: 100%; float: left; } .playing > .time-after { background-color: red; display: inline-block; height: 100%; float: right; }
display:flex;
basicly , can wrap few lines or columns.
height must removed , background-color sufficient
li { color: orange; } .time-before { background-color: green; } .time-after { background-color: red; } li { display:flex; } li > div {flex:1;}
<li each={ queue } onclick={ play }> <span>{ title }</span> <span>{ artist }</span> <span>{ stringifytime(length) }</span> <div class='time-before'></div> <div class='time-after'></div> </li>
Comments
Post a Comment