Styling the tooltip anchor?

Styling the tooltip anchor? was created by lhat

Posted 11 years 1 month ago #9177
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!
by lhat

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

Replied by ced1870 on topic Styling the tooltip anchor?

Posted 11 years 1 month ago #9191
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 1 month ago by ced1870
Last edit: 11 years 1 month ago by ced1870.

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

Time to create page: 0.601 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 798 guests and no members online