Lauren Marie Lauren Marie - 1 month ago 13
CSS Question

Changing the colors of a Hyperlink and paragraph text

so I have looked just about everywhere online for solutions to this problem from adding a class to the hyperlinks to using a span, and ultimately what is happening is that the hyperlink and paragraph I want to change are being overridden by what I can only assume was a previous hyperlink/paragraph style?

Am I doing this correctly and it's just matter of placement within the css?

I will post the website link so you can take a look at the code if needed.
I will also post a snapshot below of the DreamWeaver preview of what the text is supposed to look like within the footer.

The text I need to change: "Creative Commons Milwaukee Skyline"... at the bottom of the homepage (.index).

Answer Source

If you have access to a stylesheet that can target those directly, you can change it with !important.

So for instance, let's say you wanted to change the <p> color, you could do something like this:

p { color: #fff !important; }

You could do the same for your hyperlinks as well.

Also, looking at the source code of that website, they are sitting inside of your <div class="footernav">. So more specifically, you could target these elements like so(based solely on the source code that is there now).

Targeting the specific elements based on where they live based on their parents(.footernav being the main parent):

.footernav>p#paracred { color: #fff !important; } 

And for your hyperlink

.footernav>p#paracred a { color: #fff !important; }

You most likely don't need the !important since you are targeting them directly, but just in case based on your initial question.

JSFiddle for example: https://jsfiddle.net/Lm8yjdcb/

Other ways to also target these specifically, just for additional info:

Leaving out the <p> target

.footernav>#paracred { color: #fff !important; }
.footernav>#paracred a { color: #fff !important; }

Leaving out .footernav target

#paracred { color: #fff !important; }
#paracred a { color: #fff !important; }