html - How can I color a square div with two colors? -
i have table this:
<table class="lugares"> <tr> <td class="seat-avaliable"><div></div></td> <td class="seat-avaliable"><div></div></td> <td class="seat-avaliable"><div></div></td> <td class="seat-avaliable"><div></div></td> <td class="seat-not-avaliable"><div></div></td> <td class="seat-badvis"><div></div></td> <td class="seat-avaliable"><div></div></td> </tr> </table> there "seat-not-available" background black, seat-available green background , want add seat (seat-badvis) 2 colors, half black , half white. tried :after , :before doesn't work.
here's fiddle code:
you don't need use pseudo-selectors here, use linear-gradient instead:
background: linear-gradient(to right, #fff 50%,#000 50%); here's fiddle: http://jsfiddle.net/dbbtxl50/
Comments
Post a Comment