Setting color in CSS class does not work

I cannot set this CSS class, the color instruction does not work, but the text shadow. Help me?

.jumbotron { position: relative; padding: 40px 0; color: #6495ed; text-align: center; text-shadow: 0 1px 3px rgba(0,0,0,.4), 0 0 30px rgba(0,0,0,.075); } 

I tried to remove the text shadow, but it also did not work.

+6
source share
3 answers

Use !important to override a different color style.

like: color: #6495ed !important

+6
source

I think the closing bracket is missing. Put all the settings in the .jumbotron class and try. Good luck.

I checked your CSS as follows:

 <!doctype html> <html lang="en"> <head> <meta charset="UTF-8" /> <title>Untitled</title> <meta name="author" content="" /> <style> .jumbotron { position: relative; padding: 40px 0; color: red; text-align: center; text-shadow: 0 1px 3px rgba(0,0,0,.4), 0 0 30px rgba(0,0,0,.075); } </style> </head> <body> <p class="jumbotron">This is a test</p> </body> </html> 

It seems to work well

0
source

If the background color changes, but the text is missing, one of the possible reasons could be the anchor. By default, when you anchor text, it automatically becomes underlined because it is a link and is underlined when it is visited once. Therefore, if anyone else with this problem tries to override this in css

 a:hover, a:active, a:link, a:visited { text-decoration:none; color : #000; /* for example */ } 

or just repeat the css element and add "a" in front of the class:

myClass, myClass a {}

0
source

All Articles