[Bug] the following linear-gradient doesnt render on sololearn (it does on my browser) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

[Bug] the following linear-gradient doesnt render on sololearn (it does on my browser)

https://code.sololearn.com/WObMvVrxXLAG/?ref=app it renders well on my phone's browser, but not on sololearn

18th Jul 2020, 9:55 AM
Prabhakar Dev
Prabhakar Dev - avatar
5 Answers
+ 2
JME the rest of the past was written in anger. Initially i had it just on the body tag straight way body{background-color:linear-gradient(#8942a8,turquoise);}. This css worked for my phone and not on sololearn. After that i tried different ways which didn't work. After that i write all the code in anger so that's where the silly mistakes crept in. But believe me it still doesn't work with the fixes .
18th Jul 2020, 5:00 PM
Prabhakar Dev
Prabhakar Dev - avatar
+ 2
JME anyways thank you. The "position: absolute;" was somehow causing it which is maybe a bug. You can still go and uncomment it to see the bug its causing.
18th Jul 2020, 5:08 PM
Prabhakar Dev
Prabhakar Dev - avatar
+ 2
JME yes i guess that's the problem but isn't it wierd how an incorrect property cause such a behaviour
18th Jul 2020, 5:38 PM
Prabhakar Dev
Prabhakar Dev - avatar
0
#1 your css selector is wrong. .cont should be #cont{} #2 that is not how you you set vendor css, each needs background declared before it, example: background: -moz-linear-gradient(black, transparent); /* FF 3.6+ */ background: -ms-linear-gradient(black, transparent); /* IE10 */ however in this case none should be needed to display on mobile.
18th Jul 2020, 4:42 PM
JME
0
You can't use position on the body element. But you can on a div. https://code.sololearn.com/Wrwv55NMp7tN/?ref=app
18th Jul 2020, 5:37 PM
JME