HTML code in VSD #2 - Post ID 215636

User 219465 Photo


Registered User
324 posts

I'm trying to understand, but it seems that the button and link code work a little bit different when it comes to the color?

When I used the back button code, a.back_button { color:#FFFFFF; font-weight:bold; }, I was able to change/control the color. But now in the link code, a.href { color:#000000; font-weight:bold; }, I can not change the color? In this case I change the white to black, #000000.

Library tomorrow.....HTML FOR DUMMIES :cool:
User 187934 Photo


Senior Advisor
20,271 posts

Try this.:)
a { color:#000000; font-weight:bold; }
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 219465 Photo


Registered User
324 posts

I should have added this in my last post, here is what I have in the header:

<style type="text/css">
<!--
a.link { color:#000000; font-weight:bold;
a.link :visted{ color:#000000; }
a.link :hover { color:#000000; }
a.link :active { color:#000000; }
-->
</style>


I tried with and without the .link, but nothing :(
User 187934 Photo


Senior Advisor
20,271 posts

Make sure your link has the class added to it.
<a class="link" href="http://mywebsitename.com">HOME</a>
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 219465 Photo


Registered User
324 posts

Here is what I have in the Body:
<a class="link" href="http://mywebsitename.com/index">HOME</a>

Still, if I change to color code, it never changes. I did a browser refresh also.
User 187934 Photo


Senior Advisor
20,271 posts

Can you share a link?
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 219465 Photo


Registered User
324 posts

Its not live yet. I can get the color to change for the text of the back button, just not the text for the link.
User 187934 Photo


Senior Advisor
20,271 posts

Can you publish it to a test site or your S-Drive account?:)
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 1948478 Photo


Senior Advisor
1,850 posts

I would stay away from using "link" as a class name, since it is part of the pseudo class ":link" and therefore 'protected'. Could possibly cause confusion...

The following should be fool-proof (famous last words...! :/ )
I added the pseudo class for the base case, and corrected the spelling of 'visited' ;) ):

HTML:
<a class="mylink" href="http://mywebsitename.com">HOME</a>

CSS:
a.mylink:link {color:#000000; font-weight:bold;}
a.mylink:visited {color:#000000;}
a.mylink:hover {color:#000000;}
a.mylink:active {color:#000000;}
User 219465 Photo


Registered User
324 posts

Per, I tried your code but I get the blue text and it changes to green on mouseover. I am trying to avoid that and maintain a specified color.

Rolly, I have to run out, but will upload a test later, to my s-drive account if I have one still :/

Thanks guys, be back later :D

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.