Jump to content

Changing link colour of H1 tag


otester

Recommended Posts

I wanted to make my header text into a link (so a user can get back to the main page easily).

 

I've noticed that H1 tags don't behave the same way as normal div tags when it comes to dealing with links.

 

The H1 link just won't respond (stays default blue link colour):

 

HTML:

 

<div id="header_container_menu_item_2"><a href="http://www.punch101.com"><h1 id="title_link">x</h1></a></div>

 

 

CSS:

 

a.title_link:link { text-decoration: none; color: #F90; }
a.title_link:visited { text-decoration: none; color: #F90; }
        a.title_link:hover { text-decoration: none; color: #F90; }
a.title_link:active { text-decoration: none; color: #F90; }

 

Any help at all would be greatly appreciated?

Link to comment
https://forums.phpfreaks.com/topic/210373-changing-link-colour-of-h1-tag/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.