Jump to content

inline font color depreciated?


Recommended Posts

I have a few web pages with weblinks that actually requires different colored fonts for different types of links.If it was possible to create <a1> <a2> <a3> tags (instead of the usual <a>) to create CSS links with a pre-defined colored fonts in the head page I would use it. But as it is now (with this specific kind of page that I'm building), not designating font color inline could bring a lot of headaches. Is this a case where I should just ignore the fact that font color done inline is depreciated, or are the actually benefits to going to the trouble of designating font color in the head CSS worth it? What are the benefits? The extra amount of writing (which in this case really isn't any more then copy and paste) seems well worth it considering the amount speed that problems can get troubleshooted inline.

Edited by dudaweisf
Link to post
Share on other sites

You can do this:

<html><head><style>a.redclass:link {color:orange;}a.greenclass:link {color:green}</style></head><body><a href="example.com">normal color</a></br /><a class="redclass" href="example.com">red color</a></br /><a class="greenclass" href="example.com">blue color</a></br /></body></html>

Link to post
Share on other sites

Inside your CSS file, use your text editors 'Find' function and search for: "a:hover". Just completely delete that and it will stay the same color when you hover over it. Although without seeing the CSS, I hard to be accurate. If you post your CSS file, I'll identify the area you need to delete. Regards, Lab.

Edited by Labtec
Link to post
Share on other sites

Alternately, simply apply the same CSS to the :hover state as the non-hover state and it will not change colour.Personally, I would simply comment out the existing :hover CSS in case you needed it back some day.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...