Trying to Set Gradient Bar on Title? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

Trying to Set Gradient Bar on Title?

I'm trying to set an effect on the title of my page so that it creates a contrast against my background, thus making the text easier to see. However, my gradient is not working. I can set a solid background color easily enough though... but the code as it appears below in CSS is not giving me the gradient background. Anyone have any tips? h1{ font-family: "Lora", "Libre Baskerville", "Times New Roman", serif; text-decoration: underline; text-align: center; background:linear-gradient(90deg rgba(0, 0, 0, 0) 10% rgba(0, 0, 0, .5) 40% rgba(0, 0, 0, .5) 60% rgba(0, 0, 0, 0) 90%); }

1st Oct 2017, 6:46 PM
David Gouldthorpe
David Gouldthorpe - avatar
1 Answer
- 1
Just found out, I forgot to put commas after my percentages!
1st Oct 2017, 6:56 PM
David Gouldthorpe
David Gouldthorpe - avatar