5

Let’s say we have:

<a id="link" href="#"  title="i am the title">link</a>

Is there a way to use CSS to uppercase the "i am the title" text that will be shown on mouse hover by default?

Paul D. Waite
  • 96,640
  • 56
  • 199
  • 270
Toni Michel Caubet
  • 19,333
  • 56
  • 202
  • 378

3 Answers3

6

Not that I'm aware of.

You can select an element by its attribute(s), but not select an attribute itself.

A little bit of JavaScript can do it, however...

var elem = document.getElementById('link');

elem.title = elem.title.toUpperCase();

jsFiddle.

alex
  • 479,566
  • 201
  • 878
  • 984
1

No - title like tooltips are browser dependant, CSS can't change them.

But here's a link that shows how you can make a fake tooltip look like you want with CSS only: How to change the style of Title attribute inside the anchor tag?

Community
  • 1
  • 1
K. Bob
  • 2,668
  • 1
  • 18
  • 16
0

I've got the solution, provided you are using jQuery.

Here's a live demo - http://jsfiddle.net/WzYkQ/

Karthik Rao
  • 321
  • 3
  • 9