Styling the tooltip anchor?

More
11 years 8 months ago #9177 by lhat
What a handy plug-in! Thanks for sharing this with the Joomla community.

But I do have a question/suggestion: Is there a way to easily change the style of the tooltip anchor (the word or phrase being explained)? For example, I would like to organize my site's tooltips into groups and to signal those groups in the colors of the tooltip anchors. But after examining the docs and code for ToolTip GC, I don't find any suggestions on styling the anchor.

A couple ideas come to mind. One could wrap the anchor term with a span to apply a style locally, like so:

         {tooltip}<span style="color:red;">anchor</span>{end-text}tool tip text{end-tooltip}

Though this isn't best CSS practice CSS could get tedious in a large and diverse site. One could also mark tip anchors with icon images to signal the tip groups, something like this:

        {tooltip} B) anchor{end-text}tool tip text{end-tooltip}

as opposed to this:

        {tooltip} :unsure: anchor{end-text}tool tip text{end-tooltip}

But how could one do this in the site's template, for example, applying different class styles to each instance?

Would there be a way to add anchor styling to the configuration options, so that even article editors (without access to the template or css) could change how the anchor appears?

Ideas welcome!

Please Log in or Create an account to join the conversation.

More
11 years 8 months ago - 11 years 8 months ago #9191 by ced1870
Replied by ced1870 on topic Styling the tooltip anchor?
Hi
you can do what you want in your editor. For example add a css class :
Code:
{tooltip}<span class="test">anchor</span>{end-text}tool tip text{end-tooltip}
and then in your css add
Code:
.test {color:red;}
you can also add images with your editor
CEd

Joomlack Webmaster and Developer
Last edit: 11 years 8 months ago by ced1870.

Please Log in or Create an account to join the conversation.

Time to create page: 0.202 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 450 guests and one member online