Title attribute styles

Associate
Joined
2 Aug 2005
Posts
680
Does anyone know if it's possible to style the title attribute so when you do a mouseover on an image or some text you can style the box in CSS?

Thanks
 
Can you clarify, please? When you say 'title' I got the impression you were referring to <title>blah</title> ?
 
He means the title attribute that can be given to hyperlinks.

Such as:

Code:
<a href="http://www.google.com" rel="external" title="Link to Google">Google</a>

No, you can't I'm afraid. Title is an HTML attribute, not an element.
 
Can you clarify, please? When you say 'title' I got the impression you were referring to <title>blah</title> ?

The title attribute

Code:
<h2 title="Hello There!">Titled Heading Tag</h2>


No, you can't I'm afraid. Title is an HTML attribute, not an element.

So I guess the only way to achieve the box would be some sort of javascript?
 
Code:
<html>
<body>
<script language="JavaScript">
function titleChange (obj)
{
    obj.title="new title here!";
}

function titleChange2 (obj2)
{
    obj2.title="default title here!"
}
</script>

<a href="#" title="default title here!" onMouseOver="titleChange(this)" onMouseOut="titleChange2(this)">link</a>
</body>
</html>
 
title7ie.jpg


You cannot style that pale yellow title box using CSS.
 
theMAD2 said:
So I guess the only way to achieve the box would be some sort of javascript?

No, the box is acheived by adding the attribute into the elements tag like I shown you above.

I don't think headers are supposed to have titles. There would be little point.
 
BaJ said:
Wave a bit of DOM magic over them .... Sweet Titles.
I can't quite see that website could he make it larger and give it a worse colour scheme please?

(Does look nifty, though. But the lack of a fade on mouseout is a bit weird for me...I prefer to have my tooltips appear instantly to get the info, so looking nice when I move off them is the only thing I'd look for.)
 
Beansprout said:
I can't quite see that website could he make it larger and give it a worse colour scheme please?
Yep, but as we all are often heard to say, 'content is king', and Dustin Diaz has excellent content. Read his stuff on the YahooUI libraries and javascript in general :cool:.
 
Augmented said:
Yep, but as we all are often heard to say, 'content is king', and Dustin Diaz has excellent content. Read his stuff on the YahooUI libraries and javascript in general :cool:.
His content is great so far, I'll read more :)

But I'll make full use of FF so my eyes survive :)
 
Back
Top Bottom