Changing text/link properties in...

User 629250 Photo


Registered User
50 posts

I have an area on a web page that is darker than the rest of the page. The properties for text/links are not the best for this darker area. I'd like to change the text color and link properties just for this area.

I created
.style2 {
font-family:verdana;
font-size:13px;
color:#FFFFFF; }
a:link { color:#FFFFFF; }
a:visited { color:#FFFFFF; }
a:hover { color:#AAAAAA; }
a:active { color:#FFFFFF; }


added it to the html header section for the piece of HTML in VSD.
I added

<span class="style2"> </span>

around the text that I want changed.

However the link properties override the entire page.

Can some point me to a resource that might help me sort this out. I've been googleing and reading all morning and I think I'm close.

Thank you,
User 187934 Photo


Senior Advisor
20,266 posts

Can we have a link to the page? It's easier.:)
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 471275 Photo


Ambassador
1,130 posts

There is a way to do it which I have used and it work.

In the css add this:

a.other:link {colour: # the color you want;}
a.other:hoever {colour: the color you want}

You can also do the above for active and visited if you wish.

Now in the html where you have the link it should look like this:

<a href="name.html" class"other"> name </a>

Hope this works for you.
:)

User 629250 Photo


Registered User
50 posts

Here is my solution.

My problem was that I was not creating a separate "class" for the links. I was overwriting the page default.

For text I now have a new class "style2".
For links I have a new class "two"


In the Header HTML box:
<style type="text/css">
<!--
.style2 {
font-family:verdana;
font-size:13px;
color:#FFFFFF;
}
a.two:link { color:#FFFFFF; }
a.two:visited {color:#FFFFFF; }
a.two:hover { color:#AAAAAA; }
a.two:active { color:#FFFFFF; }
-->
</style>


In the Body HTML box:
<span class="style2"> MISC TEXT AND LINKS </span>


Then for the links:
<a class="two" href="http://www.website.com">link name</a>


It may not be the optimum solution but it works.

User 471275 Photo


Ambassador
1,130 posts

Randall
It looks good to me and it works and that is great :)


Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.