CSS Linear gradient Issue

Hey guys!

I’m trying to apply a linear gradient to a background, but now matter what I do it’s always showing white.
I change the background to a basic color like blue and it worked so the issue it’s
definitely on my code.
Maybe you could see something that I’m missing ;(
The code is this:
background: linear-gradient(179.97deg, #E6007E 0.03%, #8D43D7 56.13%, #5552D3 100.67%);

Thanks in advance :smiley:

There is little information here but try this, if you’ve written this line in a specific style.css file.
This line must “overwrite” the default css hence the mention !important at the end.

background: linear-gradient(179.97deg, #E6007E 0.03%, #8D43D7 56.13%, #5552D3 100.67%) !important;

2 Likes

I tried that but still showing the white background. But thanks anyway :wink:

I tried your css on my page and it works (gradient from bottom blue to top fuchsia). Where are you writing this line?

I’m applying this to the body of my layout page. The thing is I can apply a basic color but the linear gradient is not generating the webkit line.
(Sorry my english is really basic)


image

I’m still learning these things but I think the css should read like the below. The webkit will auto generate upon saving your style.css file.

body {

   background-image: -webkit-gradient(linear, left bottom, right top, from(#023047), color-stop(#094964), color-stop(#116481), color-stop(#18809f), to(#219ebc));

   background-image: linear-gradient(to right top, #023047, #094964, #116481, #18809f, #219ebc);

}
1 Like

Ahhh nevermind…
the first code worked from the beggining.
Somehow, since I didn’t had content at all it was not displaying the colors.
Thank you so much!

#checkoutLayout {
background: linear-gradient(179.97deg, #E6007E 0.03%, #8D43D7 56.13%, #5552D3 100.67%) !important;
width: 100vw;
min-height: 100vh;
}

1 Like