Page 1 of 1
Styling with CSS Hovertext in html output
Posted: Wed Jun 19, 2013 11:20 pm
by eloralon
Hello,
I am now able to show the hovertext with the help of oXygen XML support team.
I need to style the hovertext for instance change the background color of the text box from yellow to some different color, adjust the text indentation and padding as well as change the box border properties...
Would you please show me how/where to make the changes for the above properties?
Thanks
Re: Styling with CSS Hovertext in html output
Posted: Thu Jun 20, 2013 10:05 am
by sorin_ristache
Hi,
The tooltip appearance is browser dependent. For example in Firefox I have a gray background on the hover text, not yellow. You can however set the text in a different attribute, for example
data-title, and set the hover style on that attribute. You can find some details
here.
Regards,
Sorin
Re: Styling with CSS Hovertext in html output
Posted: Thu Jun 20, 2013 5:53 pm
by eloralon
Thanks Sorin,
Can you provide a simple example of what you meant in the context of oXygen XML. I have read the reference thread you pointed out in your reply.
Where can I make a change inside the oXygen provided CSS or XSLT to get to style the text like the one you mentioned (data-title).
Thanks
Re: Styling with CSS Hovertext in html output
Posted: Fri Jun 21, 2013 4:47 pm
by sorin_ristache
Hi,
You can add your CSS customizations for the hover popup style to the CSS file
[Oxygen-install-dir]\frameworks\dita\DITA-OT\plugins\com.oxygenxml.webhelp\oxygen-webhelp\resources\css\webhelp_topic.css which is included in every HTML output file of the DITA Webhelp transformation
or you can create your own CSS file and set it in the
args.css parameter of the DITA Webhelp transformation.
If you want to go the way of adding an attribute
data-title to the
<a> element corresponding to a glossary term then you have to add this attribute by modifying the template
Code: Select all
<xsl:template match="*[contains(@class,' topic/term ')]" name="topic.term">
from file
[Oxygen-install-dir]\frameworks\dita\DITA-OT\xsl\xslhtml\dita2htmlImpl.xsl. There is an element
<a> with an attribute
title="{$hovertext}" constructed inside this XSLT template.
Regards,
Sorin
Re: Styling with CSS Hovertext in html output
Posted: Mon Jun 22, 2015 7:54 am
by Anuradha
Hi,
I use <oXygen/> XML Author 14.2 and the output help that i build is Eclipse and Webhelp.
I would like to show hovertext for some definitions and short descriptions of terms in my output. Could you please explain how to do that?
Thank you
Anuradha
Re: Styling with CSS Hovertext in html output
Posted: Mon Jun 22, 2015 11:34 am
by Radu
Hi Anuradha,
You probably need to perform some XSLT customization and set the
title attribute on the HTML reference with a custom value derived from the shortdescription.
Maybe you could ask about this on the DITA Users List:
https://groups.yahoo.com/neo/groups/dita-users/info
Regards,
Radu
Re: Styling with CSS Hovertext in html output
Posted: Mon Jun 22, 2015 11:39 am
by Anuradha
Sure. Will do that.
Thank you
Anuradha