+ 3

Can we color only half of page?

11th Sep 2020, 6:25 PM
Vedant Jhunjhunwala
Vedant Jhunjhunwala - avatar
4 Réponses
+ 4
Yeah just create a div (class="halfDiv") and add CSS: .halfDiv{ width: 50%; height: 100px; background-color: green; } You can adjust the height EDIT: as Arturop mentioned, gradient would also be helpful: body { background: linear-gradient(90deg, green 50%, white 50%); }
11th Sep 2020, 6:33 PM
Bagon
Bagon - avatar
+ 1
I think yes By using div
11th Sep 2020, 6:33 PM
Abdollahi Mohammed
Abdollahi Mohammed - avatar
+ 1
Background color of body with gradient i'd use.
11th Sep 2020, 6:44 PM
arturop200
arturop200 - avatar
+ 1
Yes specify using div
12th Sep 2020, 8:30 AM
P. Aamir
P. Aamir - avatar