Archived topic
Gradient background on page
3 replies · Started by ivar on March 8, 2019
Hello, friends. I experimented with the page background as in this post:
https://generatepress.com/forums/topic/gradient-background-on-page/
And I have one problem: the same code works differently( background size changes) on pages:
Example 1:https://neformativ.ru/kak-nachat-vesti-blog-s-nulya
Example 2:https://neformativ.ru/kak-izbezhat-matritsy
There are no additional settings on the pages. They're identical. What could be the reason?
code CSS:
body {
background: rgb(148,185,242);
background: linear-gradient(163deg, rgba(148,185,242,1) 4%, rgba(200,218,246,1) 6%, rgba(255,255,255,1) 8%);
}
Hi there,
Likely because the page length is different.
Here are couple of articles I found on Google that might help:
https://medium.com/@patrickbrosset/do-you-really-understand-css-linear-gradients-631d9a895caf
https://stackoverflow.com/questions/37895879/is-it-possible-to-set-the-length-of-a-linear-gradient-in-css
Linear gradient isn't theme specific so you should be able to find lots of examples and explanations online :)
You're right. The length of the page changes the background... Thank you!
No problem :)