Need a little help at CSS. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Need a little help at CSS.

Let's say I made a rectangle, now I want the other half of it with background color red while the other half with blue background color. How can I accomplish this? Thanks for answering.

7th Oct 2017, 1:25 PM
Isair Calhawk
Isair Calhawk - avatar
1 Answer
+ 3
Try background-image: linear-gradient(to right, red, red 50%, blue 50%); https://code.sololearn.com/WwvwEipBmOI8/?ref=app
7th Oct 2017, 1:41 PM
Calviղ
Calviղ - avatar