Forum Moderators: open

Message Too Old, No Replies

Custom look for "title" attribute

Can it be done with CSS?

         

Oldiesmann

6:52 pm on Nov 5, 2004 (gmt 0)

10+ Year Member



Is there any way to customize the appearance of the little tooltips displayed when using the "title" attribute without having to use any kind of scripts? My friend just had me add mouse-over topic previews to his board (ie you hover over the link for a topic and it displays the first 128 characters of the first message in that topic) via the title attribute, and now he would like to know if it's possible to customize the appearance of this to match the colors of his board a bit. I figured it would be a simple addition to the stylesheet, but no matter what I do, I can't get it to work. I've tried both color and background-color properties for a:hover title and a:title but it always appears the same. Is it possible to do this using just CSS or do I have to create custom tooltips with javascript? It's not really a big deal, but I thought it would make the forum look a little nicer.

encyclo

7:35 pm on Nov 5, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld [webmasterworld.com], Oldiesmann.

Unfortunately, you can't use CSS to change the look of a mouseover tooltip - it's a browser setting.

Another option if you want to customize the look of the tooltip is to create one with Javascript as a floating div, and then style that. However, you may well run into cross-browser incompatibilities.

Oldiesmann

11:27 pm on Nov 5, 2004 (gmt 0)

10+ Year Member



Ok. I think I'll just stick with the browser default for now. Thanks for the quick response.