PrateekSaxena Posted February 20, 2007 Share Posted February 20, 2007 Hello,Is there any way in which a <DIV> that could show a tooltip. I mean the yellow one that is default that comes as the ALT of the images on mousover. I don't want something like this - http://dhtmlgoodies.com/index.html?page=tooltip . Could someone help? Link to comment Share on other sites More sharing options...
shaileshb Posted February 20, 2007 Share Posted February 20, 2007 Use 'title' attribute to DIV. That is <DIV title="your tooltip">. Link to comment Share on other sites More sharing options...
justsomeguy Posted February 20, 2007 Share Posted February 20, 2007 Why don't you want to use those you linked to? I don't like using alt or title attributes because not all browsers will display them as tooltips. If the image loads, Opera doesn't do anything with the alt attribute. I prefer to use Walter Zorn's tooltip library, it works great. You can style everything, have images in the tooltips, etc. They are just divs.http://www.walterzorn.com/tooltip/tooltip_e.htm Link to comment Share on other sites More sharing options...
croatiankid Posted February 20, 2007 Share Posted February 20, 2007 Why don't you want to use those you linked to? I don't like using alt or title attributes because not all browsers will display them as tooltips. If the image loads, Opera doesn't do anything with the alt attribute.]neither does firefox. but all 3 browsers display a tooltip with title Link to comment Share on other sites More sharing options...
jlhaslip Posted February 20, 2007 Share Posted February 20, 2007 neither does firefox. but all 3 browsers display a tooltip with titleAs croatiankid says: the "title=" is supposed to be displayed when you mouse over a link.The "alt=" is for replacing images which (for some reason) are not displayed. Some Bowsers *cough* IE *cough* 'high-jacked' the "alt=" to perform what the "title=" was intended for as mouse-over tooltips.The "title=" is also used by Accessibility tools like screen readers, so if that is an issue, use "title=" is my suggestion. Link to comment Share on other sites More sharing options...
PrateekSaxena Posted February 21, 2007 Author Share Posted February 21, 2007 so title it is..what I making need to work on IE and FF only so it is not a problem Link to comment Share on other sites More sharing options...
jlhaslip Posted February 21, 2007 Share Posted February 21, 2007 In the Olden Days *trumpet flourish here* both the alt= and title= were used. But it doesn't validate if you use both. Link to comment Share on other sites More sharing options...
croatiankid Posted February 21, 2007 Share Posted February 21, 2007 It depends on what you use them on. Only IMG and maybe a few other elements have the alt attribute. Most elements (including IMG) have title. Link to comment Share on other sites More sharing options...
PrateekSaxena Posted February 21, 2007 Author Share Posted February 21, 2007 ok..thanks all i hv decided to use TITLE but if cozez a problem i might wtire my own tooltip js Link to comment Share on other sites More sharing options...
justsomeguy Posted February 21, 2007 Share Posted February 21, 2007 I'm telling you man, just use the Walter Zorn library I linked to above, it works and looks great. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now