-2

I have a problem here. So like usual when we create css code on editor, like:

body{
  font-family:arial;
  font-size:12px;
  color:#1e5474;
  background:#F7F7F7;
}

that code is saved in our inspect element. In this case I use Chrome. My problem is the color. This is the code of a blue color. But it doesn't produce like that, my line still doesn't change. When I open inspect element code "color#1e5474" is scored out. I can't change it. How i fix it?

jakaperdana
  • 17
  • 1
  • 1
  • 6

2 Answers2

2

If the style is crossed out, it means that the property is getting over-written by something else within your stylesheet. Either remove that other attribute or add !important to the end of the color statement.

So it'd look something like this color:#1e5474 !important;

Josh Walshaw
  • 200
  • 1
  • 2
  • 17
0

If you're using something like Bootstrap it might be being over-written by other code. If you inspect the element with Chrome you can see where it's getting it's current color from and take action as needed. You might also want to try using !important to override it. color:#1e5474!important;

Here is some information on what the !important code does:

What does !important in CSS mean?

AndrewLeonardi
  • 3,351
  • 9
  • 47
  • 100