How to add background to the element that will occupy half of the container (in length)? I can do this with linear-gradient :
.half-background { border: 1px solid grey; background: linear-gradient(90deg, #69f0ae 50%, transparent 50%); } <div class="half-background">test text</div> But this method does not suit me. Is there another way?