Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3997474
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T07:24:24+00:00 2026-05-20T07:24:24+00:00

I have a global javascript function which .appends() a tooltip element to any element

  • 0

I have a global javascript function which .appends() a tooltip element to any element with the data-tooltip attribute.

This is all cool until I try to give an anchor the data-tooltip attribute, which seems to break the css because I cannot seem to remove the text-decoration rule on the tooltip.

How do I remove text-decoration on the child of an anchor?

The underline is clearly being inherited from the parent anchor, as it has the default anchor colour underline, but the color of the tooltip text is orange.

See http://img.ly/35kc for a clearer idea of what I am talking about.

Update

Here is my css for the tooltip, as requested

/*TOOLTIPS*/

.tooltip_placeholder {
    position: relative;
    width: 0px;
    height: 0px;
    white-space:nowrap;
    display: inline;
    z-index: 100;
    text-decoration: none;
}

.tooltip_boundary {
    position: absolute;
    width: 300px;
    z-index: 100;
    text-decoration: none;
}

.tooltip_border {
    z-index: 100;
    background: url(/sales/global/images/tooltip_arrow.png) no-repeat;
    padding-left: 35px; /*left offset*/
    background-position: 16px 0px;
    float: left;
    z-index: 100;
    text-decoration: none;
}

.tooltip {
    padding: 8px;
    color: #A97D35;
    background: #FBF98E;
    -moz-border-radius: 0px 8px 8px 8px;
    border-radius: 0px 8px 8px 8px;
    border: 6px solid #F9E98E;
    font-size: 12px;
    text-transform: none;
    z-index: 100;
    text-decoration: none;
}

This is how a tooltip is put in:

$(element).append('<div class="tooltip_placeholder"><div class="tooltip_boundary"><div class="tooltip_border" style="display: none;"><div class="tooltip">'+$(element).attr('data-tooltip')+'</div></div></div></div>')

Update 2

@Guffa has kindly fiddled this http://jsfiddle.net/TxRmk/
The issue appears to be browser specific, as I can get it to work in FF, not Safari or Chrome. Haven’t checked IE, but it probably does something completely different

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T07:24:24+00:00Added an answer on May 20, 2026 at 7:24 am

    http://jsfiddle.net/CHSmV/

    I couldnt get it to work without modifying your HTML. If you are able to do that, see my fiddle. I added an extra span around the non-tooltip text and added classes to both spans. Then I targeted the relevant spans with the proper text-decoration.

    This worked in FF 3.6, IE 7+8, Safari 5 and Chrome 9.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a javascript function (function1) that checks some global variables (can the user
I have the following JavaScript code which is inside a function which I am
VB 6.0 does not have any global handler.To catch runtime errors,we need to add
I have a class Application that my global.asax inherits from. The class has this
i have jquery global error event set, like following: $(#message_alert).ajaxError(function(event, XMLHttpRequest, settings, thrownError){ ajax_error(XMLHttpRequest);
Here's some JavaScript: linkElem.click(function () { var data = linkElem.data(); alert(''+data.mls + ' '
I have a site which uses a lot of JavaScript (mainly jQuery) and I
I have a javascript function that, in most cases, needs to do something with
How I can execute a JavaScript function/piece of code in a specific context which
I have the following Javascript function that should return an array of groups that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.