Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialAngelic Sanoy
Full Stack JavaScript Techdegree Student 6,583 PointsAppend A linear-gradient in my background-image
The WordPress I use only support two shade of gradient and I wanted to use this gradient.
background: linear-gradient(144deg, rgba(58,95,180,1) 0%, rgba(29,127,253,1) 34%, rgba(90,45,253,0.5074404761904762) 68%, rgba(69,211,252,0.6502976190476191) 100%);
I added a id called #multiple-gradient . I'm curious on how can I change this gradient to multiple gradient just like above http://prntscr.com/pecexp
I tried to use
#multiple-gradient.et_pb_section {
background-image: linear-gradient(144deg, rgba(58,95,180,1) 0%, rgba(29,127,253,1) 34%, rgba(90,45,253,0.5074404761904762) 68%, rgba(69,211,252,0.6502976190476191) 100%);
}
But the image is gone.. What I really want is everytime I add ID called #multiple-gradient in every section, I wanted to use this gradient instead.
background: linear-gradient(144deg, rgba(58,95,180,1) 0%, rgba(29,127,253,1) 34%, rgba(90,45,253,0.5074404761904762) 68%, rgba(69,211,252,0.6502976190476191) 100%);
Here's the site: http://getrefinanced.com.au/
Should I use a jQuery? What I want is to only replace the gradient, I don't want to lose the image. Here's the code:
div.et_pb_section.et_pb_section_0 {
background-position: top center;
background-image: linear-gradient(123deg,rgba(43,135,218,0.73) 29%,rgba(12,113,195,0.5) 100%),url(http://getrefinanced.com.au/wp-content/uploads/2018/05/hiring-a-mortgage-broker.jpg)!important;
}
1 Answer
Angelic Sanoy
Full Stack JavaScript Techdegree Student 6,583 PointsI have managed to fix it using :before
multiple-gradient:before {
background-image: linear-gradient(144deg, rgba(58,95,180,1) 0%, rgba(29,127,253,1) 34%, rgba(90,45,253,0.5074404761904762) 68%, rgba(69,211,252,0.6502976190476191) 100%);
}