I’m trying to created a pure css tooltip. I have the test code here: http://jsfiddle.net/RBdn4/
The only problem with this is that in Chrome, the text is underlining on the tooltip despite having the text-decoration: none; line in the css.
Any suggestions on how to get this to stop? The link should underline, but the .tooltip text should not.
Chrome applies the link’s
text-decorationto the<div>because it is a child of the<a>.Add a wrapper element around the
<a>and make the tooltip<div>a sibling instead of a child of the<a>. Show the tooltip when the wrapper is:hovered.Oh, and make that CSS make sense!
HTML
CSS
Demo: http://jsfiddle.net/mattball/u66GT/