Skip to main content
Known Participant
January 5, 2011
Question

Visited Links - Override all link colors

  • January 5, 2011
  • 3 replies
  • 6758 views

Hi,

I'm using RH8 in WebHelp and IE.  I read all the former postings regarding people having the same problem and some mentioned a fix in a .css but the .css wasn't available with the posting of March 25, 2008.

My visited link color seems to override all other link colors.  Originally I had the link colors in a style sheet and changed the colors in the .css.  That didn't work and all colors still were the visited link color.  I deleted the link colors from this .css and added the link colors via the RoboHelp Edit Styles.  Either way doesn't seem to work and all link colors are my visited color.  I've tried clearing my cache several times and this doesn't work, neither does deleting the history.

Can anyone shed some light on this?  Thanks very much for any help you can provide.

This topic has been closed for replies.

3 replies

SueKLAuthor
Known Participant
January 5, 2011

Thanks very much, Leon and Rick.  I'm getting there.  I changed my .css in Dreamweaver to be in the order specified.  Now they're still purple for many of them but are blue when I hover over them.  Some other links are blue.  I should have mentioned that many of the links that are initially purple are in my mini-TOC which I put in each page (not via a Master page).  I looked in the .html code for them but couldn't see a color property.  I don't see where I can change this property.

I have other things in my .css. (not links but headings, etc.) before the link properties.   Should I put the Link/Visited/Hover/Active before anything else in the style sheet?

Thanks again for your responses, I appreciate your time.

MergeThis
Inspiring
January 6, 2011

If you look into the HTML code of the output in the mini-TOC block, you'll see two style settings:

A class setting for the Show/Hide dropspot label:

... <a class="dropspot" ...

A standard hyperlink to the RH-generated bookmarks:

... <a href="#MiniTOCBookMark2" ...

That second one should follow whatever settings you've previously set up in your CSS file.

If you want these mini-TOC links to be different, you could set the default "a href" styles with one look, and then set up a separate class for other normal topic hyperlinks, such as "a.topic:link { styles }", "a.topic:visited { styles }", etc.

The other thing to keep in mind is this: the reason for the name Cascading Style Sheets.

The styles in the .css file

     are overridden by the styles in the <HEAD> section of the topic page

          which are overridden by styles added in-line (at a specific instance of formatted content).

Those last two could be affecting your results.

[Another thing: don't use the Styles window (by double clicking the .css file in Project Manager). In my projects, the "Hyperlink" styles it "previews" do not agree with my .css settings. I suggest you do all your work in the .css file with Notepad or a similar text editing tool.]

Good luck,

Leon

SueKLAuthor
Known Participant
January 6, 2011

Hi Leon,

Thanks again.  I looked at the code in the "view source" as you suggested for the <a href="#MiniTOCBookMark2"...  I'm puzzled because there is no color definition here just:

<div align="left" class="droptext" id="MTPOPUP31335" >
<ul style="text-align:left; font-family:Verdana;font-size:10pt;font-weight: normal;font-style: normal;text-decoration: underline;"  >
  <li><a href="#MiniTOCBookMark2" style="font-family:Verdana;font-size:10pt;font-weight: normal;font-style: normal;text-decoration: underline;">Purpose</a>
</li>
  <li><a href="#MiniTOCBookMark3" style="font-family:Verdana;font-size:10pt;font-weight: normal;font-style: normal;text-decoration: underline;">Screen Tour</a>

I looked in the mini-TOC set-up (Format Placeholder) and don't see anywhere where I can define what the color is supposed to be for visited links and don't understand how I could change this.  I even checked the "use styles from topic" box to see if that made a difference.  I'm still getting the "visited" color for my links unless I hover over, then they're blue.  I edited the .css (Dreamweaver) I inherited from another similiar project for this project and put the links in the order you suggested.  The style sheet used for this project just starts w/the BODY.

I really appreciate your help and time responding to my questions. 

Thanks,

Sue

Captiv8r
Brainiac
January 5, 2011

Hi there

In addition to Leon's excellent advice, here is a tip for easily opening the .CSS in Windows Notepad. (Notepad is the logical choice for making these edits. RoboHelp will insist on opening its own CSS dialog.)

Right-click the Project Manager and choose Explore. This will open Windows Explorer at the project location. From there, you are able to locate the CSS file and right-click to open it with Windows Notepad.

Cheers... Rick

Helpful and Handy Links

RoboHelp Wish Form/Bug Reporting Form

Begin learning RoboHelp HTML 7 or 8 moments from now - $24.95!

Adobe Certified RoboHelp HTML Training

SorcererStone Blog

RoboHelp eBooks

MergeThis
Inspiring
January 5, 2011

The .css file is your style sheet.

You need to place the a: styles in specific order (think the mnemonic LoVeHAte) inside the .css file:

LinkVisitedHoverActive

That is:

a:link {

     styles }

a:visited {

     styles }

a:hover {

     styles }

a:active {

     styles }

Although you can combine any of these, such as a:link,visited { style }, you're probably better off keeping them separate (easier to maintain later).

For more CSS help, see the W3C tutorial site.

Good luck,

Leon