Stack Overflow Asked on December 11, 2021
I want to give a gradient color to the half side of the background in the 90 degree and white color to another half side. Here is my code
body{
background: linear-gradient(90 deg, blue 50%, white 50%);
}
But here I want to give the gradient color of purple to pink instead of blue. Can I do that? If so then how?
Thank You In advance for your help
You can achieve this as below:
body {
background-image: linear-gradient(90deg,purple,pink 50%,white 50%);
}
Answered by Pritesh on December 11, 2021
You can devide the main div into 2 child divs and then by applying display:flex
to the main div or by floating the 2 children(one to left and to right) you can align 2 divs
side by side and then you can give them background color invidually.
Answered by Kiyubi on December 11, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP