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 trialJaco Kotzee
Courses Plus Student 20,157 PointsHelp converting css to stylus
I need help with converting specific css code to stylus:
section.page1 {
background-image: url(../img/mainBg-green.jpg), linear-gradient(to right,rgba(38,171,98,1),rgba(35,108,71,1))
background-blend-mode: multiply;
}
1 Answer
Alex Plaza
22,923 PointsIt should be something like this
section.page1
background-image url('../img/mainBg-green.jpg'), linear-gradient(to right,rgba(38,171,98,1),rgba(35,108,71,1))
background-blend-mode multiply
Jaco Kotzee
Courses Plus Student 20,157 PointsJaco Kotzee
Courses Plus Student 20,157 PointsExactly what I thought. But I get a compile error. Something to do with the url('') part of the code.
Alex Plaza
22,923 PointsAlex Plaza
22,923 PointsTry without the ''
../img/mainBg-green.jpg
But codepen compiles both. With and without commas.
Jaco Kotzee
Courses Plus Student 20,157 PointsJaco Kotzee
Courses Plus Student 20,157 Pointsthe error message(maybe that will shed some light on the problem): link
Thank you for the help so far.