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

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

PySide and Qt Properties: Connecting signals from Python to QML -