Hyperlink colour in HTML Header

Please post all questions on Help+Manual 8 here

Moderators: Alexander Halser, Tim Green

Post Reply
User avatar
Aitch
Posts: 544
Joined: Thu Jun 10, 2004 4:52 pm
Location: Manchester, UK

Hyperlink colour in HTML Header

Unread post by Aitch »

Hi all,

I've looked at the CSS Style guide, and a few other topics here
viewtopic.php?p=61166&hilit=change+link+colour#p61166
But I can't quite get this to work. I'm trying to change the colour of hyperlinks added to the header. I have a dark blue header, so the blue hyperlink doesn't show up. The current font is white (for the breadcrumb trail as well). and I'm happy for the hyperlink to be white as well.... Where do I change this? I've looked in the css and the hmpl page templates of the skin, but I don't want to mess with the settings too much as I'm not super confident that I won't break it :)

Thanks
Version 9.0.3 Build 6380

---------------------------------------------------------------------
Always check your spellar and gramming before you publish!
User avatar
Tim Green
Site Admin
Posts: 23154
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Hyperlink colour in HTML Header

Unread post by Tim Green »

Hi Heidi,

Where you put the CSS depends on the skin you are using. If you are using one of the standard HM skins you just need to edit the custom.css file and you will find the definitions right at the top of the file. They look like this, and the color settings should be pretty self-explanatory:

Code: Select all

  a { color: #0000FF; text-decoration: none }
  a:visited {color: #0000FF }
  a:hover {color: #E4641C; text-decoration: underline }
  a.weblink {color: #0000FF; text-decoration: underline }
  a.weblink:visited {color: #0000FF}
  a.weblink:hover {color: #E4641C }
  a.popuplink {color: #FF0000; text-decoration: none}
  a.popuplink:visited {color: #FF0000}
  a.popuplink:hover {color: #FF0000; text-decoration: underline}
  a.filelink {color: #04BC14; text-decoration: none}
  a.filelink:visited {color: #04BC14}
  a.filelink:hover {color: #04BC14; text-decoration: underline}
  a.inline-toggle {color: Green; text-decoration: none;  font-weight: bold;  font-family: "Times New Roman", serif; }
  a.inline-toggle:visited {color: Green; }
  a.inline-toggle:hover {text-decoration: underline}
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Aitch
Posts: 544
Joined: Thu Jun 10, 2004 4:52 pm
Location: Manchester, UK

Re: Hyperlink colour in HTML Header

Unread post by Aitch »

Hi Tim

Thank you for that. I do have those (with a couple of different entries), but which one is the header?
Normal hyperlinks still need to stay as is, but in the header, I need these to show differently (white) in the header.
Version 9.0.3 Build 6380

---------------------------------------------------------------------
Always check your spellar and gramming before you publish!
User avatar
Tim Green
Site Admin
Posts: 23154
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Hyperlink colour in HTML Header

Unread post by Tim Green »

Aitch wrote: Tue Nov 22, 2022 12:12 pm Thank you for that. I do have those (with a couple of different entries), but which one is the header?
Normal hyperlinks still need to stay as is, but in the header, I need these to show differently (white) in the header.
Ah, sorry. How you do that depends on which header you mean, the topic header or the main page header (and I'm still assuming you are using one of the standard skins). If it's in the topic header you can add the settings below the list of those styles in custom.css, like this:

Code: Select all

#idheader a { color: #0000FF; text-decoration: none }
#idheader a:visited {color: #0000FF }
#idheader a:hover {color: #E4641C; text-decoration: underline }
However, if your links are in the main page header, youi need to add the code to the main layout template, in Configuration > Publishing > WebHelp > Layout. You need to locate the end of the first big <style> block, which ends with these lines.

Code: Select all

 </style>

  <script type="text/javascript">
You need to put your link code BEFORE the closing </style> tag, with a different ID to identify the links in the header, like this:

Code: Select all

#hmheadbox a { color: #0000FF; text-decoration: none }
#hmheadbox a:visited {color: #0000FF }
#hmheadbox a:hover {color: #E4641C; text-decoration: underline }
</style>
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Aitch
Posts: 544
Joined: Thu Jun 10, 2004 4:52 pm
Location: Manchester, UK

Re: Hyperlink colour in HTML Header

Unread post by Aitch »

It's this heading (attached). I've tried editing the css unsuccessfully, will try again after lunch :)
Thanks Tim
You do not have the required permissions to view the files attached to this post.
Version 9.0.3 Build 6380

---------------------------------------------------------------------
Always check your spellar and gramming before you publish!
User avatar
Tim Green
Site Admin
Posts: 23154
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Hyperlink colour in HTML Header

Unread post by Tim Green »

Hi Heidi,

That's the topic header, so that version should work. It would be even better if you would include a class in your custom link, then you can format it directly. For example, suppose you invent a class called "headerlink" for these links, you would create them like this:

Code: Select all

<a href="your_link_target.html" class="headerlink">Your Link Text</a> 
Then your css code in the custom.css file would look like this:

Code: Select all

a.headerlink:link { color: #0000FF; text-decoration: none }
a.headerlink:visited {color: #0000FF }
a.headerlink:hover {color: #E4641C; text-decoration: underline }
You need to use your own colors, of course. Also remember to clear your browser cache before testing.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Aitch
Posts: 544
Joined: Thu Jun 10, 2004 4:52 pm
Location: Manchester, UK

Re: Hyperlink colour in HTML Header

Unread post by Aitch »

Thanks Tim
I've tried all settings, but I seem to be doing something wrong somewhere.

extra info: not all topic headers will have a 'Related to' link. These all refer to external (another helpfile or folder location), so it should only show when it's posted. I can get it to show as per image, it's just the colour for the link I can't get to show as white on the topic header.
It's not a major issue though, I have other solutions I can use. It was just a random thought this morning. :)
Version 9.0.3 Build 6380

---------------------------------------------------------------------
Always check your spellar and gramming before you publish!
User avatar
Tim Green
Site Admin
Posts: 23154
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Hyperlink colour in HTML Header

Unread post by Tim Green »

Hi Heidi,

Just to make sure: Are you editing the .hmskin file and not your project? If you are and it's still failing, please send me your .hmskin file at support AT ec-software.com (replace the AT with @) and I'll check it for you. If you're inserting the header links in your project, please also include a small demo project in the single-file .hmxz format with a couple of examples.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Post Reply