Change formatting in Search tab in webhelp

Please post all questions and comments regarding Help & Manual 7 here.

Moderators: Alexander Halser, Tim Green

Change formatting in Search tab in webhelp

Unread postby Gunilla_Svanfeldt » Wed Apr 17, 2019 12:07 pm

Hi,
I would like to change the colour of the results in the search tab in my webhelp. Or rather, the colour of the link (=the header of each result).

I have so far managed to change the colour of the so called "searchheading", as well as the "results" and "result_title". The latter changed the colour of the numbering, but not the link directly after it (which is now blue from start, and purple after visiting). So close.

Since I have tried most of the other parameters in the same place the ones above, I suspect that the formatting is overridden by some link format somewhere. I have tried changing link properties in the ccs-file as well, without success.

Please help?

Thanks,
Gunilla
Gunilla_Svanfeldt
 
Posts: 1
Joined: Wed Apr 17, 2019 10:35 am

Re: Change formatting in Search tab in webhelp

Unread postby Tim Green » Thu Apr 18, 2019 8:31 am

Hi Gunilla,

Yes, you're quite close. What is tricky about formatting the text in links is that you have to define the styles for the <a> tag directly, and you also need to define them three times, for the normal state, the color of the visited state (otherwise you get the standard ugly purple for visited links) and the hover state, when the mouse pointer is over the link.

The <a> tags in the search results don't have a class of their own so you need to select them via their container, which is a div with the class .result_title. The first line defining the font size will already be there in the skin you are editing. You just need to add the three additional lines for the specific formatting of the links as shown below:

Code: Select all
.result_title { font-size: 1.1em }
.result_title a:link { color: black; text-decoration: none;}
.result_title a:visited { color: black; }
.result_title a:hover { color: black; text-decoration: underline; }

I have made them very simple: Just black text and only underlined when the mouse pointer hovers. You can do anything you like, of course.

Important: You can only set the color for the :visited attribute. All other settings are ignored there.
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
Tim Green
Site Admin
 
Posts: 20619
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany


Return to Help & Manual 7 Forum

Who is online

Users browsing this forum: No registered users and 5 guests

cron