mithu_sree Posted December 19, 2006 Share Posted December 19, 2006 How can I change the color and background of the title attribute of the <a> tag and <img> tag? <a href="somepage.html" title="Go there!!"> click me </a> Quote Link to comment https://forums.phpfreaks.com/topic/31213-color-of-link-title/ Share on other sites More sharing options...
ToonMariner Posted December 19, 2006 Share Posted December 19, 2006 you can't. The only alternative is to use js to show a 'title' which would involve you using the mouse over event.Personally I would not bother - more work than its worth. Quote Link to comment https://forums.phpfreaks.com/topic/31213-color-of-link-title/#findComment-144395 Share on other sites More sharing options...
mithu_sree Posted December 19, 2006 Author Share Posted December 19, 2006 any idea doing this with CSS? Quote Link to comment https://forums.phpfreaks.com/topic/31213-color-of-link-title/#findComment-144399 Share on other sites More sharing options...
ToonMariner Posted December 19, 2006 Share Posted December 19, 2006 You can't Quote Link to comment https://forums.phpfreaks.com/topic/31213-color-of-link-title/#findComment-144431 Share on other sites More sharing options...
Daniel0 Posted December 19, 2006 Share Posted December 19, 2006 mithu_sree: When you're told it is not possible, then why do you ask if it can be done again? o_O Quote Link to comment https://forums.phpfreaks.com/topic/31213-color-of-link-title/#findComment-144507 Share on other sites More sharing options...
mithu_sree Posted December 19, 2006 Author Share Posted December 19, 2006 ;) Quote Link to comment https://forums.phpfreaks.com/topic/31213-color-of-link-title/#findComment-144514 Share on other sites More sharing options...
fenway Posted December 19, 2006 Share Posted December 19, 2006 You can make HTML tooltips, though. Quote Link to comment https://forums.phpfreaks.com/topic/31213-color-of-link-title/#findComment-144585 Share on other sites More sharing options...
DeathStar Posted January 2, 2007 Share Posted January 2, 2007 [quote]How can I change the color and background of the title attribute of the <a> tag and <img> tag?<a href="somepage.html" title="Go there!!"> click me [/url][/quote]isnt it supposed to be <a href="http://thelink.com"> clickme [u]</a>[/u] ?? ??? Quote Link to comment https://forums.phpfreaks.com/topic/31213-color-of-link-title/#findComment-151588 Share on other sites More sharing options...
weknowtheworld Posted January 7, 2007 Share Posted January 7, 2007 ??? Quote Link to comment https://forums.phpfreaks.com/topic/31213-color-of-link-title/#findComment-154979 Share on other sites More sharing options...
DarkendSoul Posted January 8, 2007 Share Posted January 8, 2007 You cannot do this with css but you can use javascript, here is an edited function that I have used.This may only work in Mozilla, my website disabled IE, so i havnt tested but i will do a quick one.** EDIT : It does not work in IE sorry. Go to the developers site and I think there is an uglier version that may work for you.[code]<div id="dhtmltooltip"> <table id="table" cellspacing="0" cellpadding="0"> <tr> <td class="left"></td> <td class="middle" id="displayText"></td> <td class="right"></td> </tr> </table> </div><script type="text/javascript">/************************************************ Cool DHTML tooltip script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)* This notice MUST stay intact for legal use* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code***********************************************/var offsetxpoint=10 //Customize x offset of tooltipvar offsetypoint=10 //Customize y offset of tooltipvar enabletip=falsevar tipobj=document.getElementById("dhtmltooltip")function ddrivetip(thetext, thewidth){ if (!thetext) return false if (!enabletip) { if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px" document.getElementById("displayText").innerHTML=thetext enabletip=true return false }}function positiontip(e){ if (enabletip){ var curX=e.pageX; var curY=e.pageY; var rightedge=window.innerWidth-e.clientX-offsetxpoint-10 var bottomedge=window.innerHeight-e.clientY-offsetypoint-10 var leftedge=(offsetxpoint<0)? offsetxpoint*(-1) : -1000 if (rightedge-10<tipobj.offsetWidth) tipobj.style.left=window.innerWidth-tipobj.offsetWidth-20+"px" //tipobj.style.left=window.pageXOffset+e.clientX-tipobj.style.left+"px" else if (curX<leftedge) tipobj.style.left="5px" else tipobj.style.left=curX+offsetxpoint+"px" if (bottomedge<tipobj.offsetHeight) tipobj.style.top=window.pageYOffset+e.clientY-tipobj.offsetHeight-offsetypoint+"px" else tipobj.style.top=curY+offsetypoint+"px" tipobj.style.visibility="visible" }}function hideddrivetip(){ enabletip=false tipobj.style.visibility="hidden"; tipobj.style.left="-1000px";}document.onmousemove=positiontip</script>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/31213-color-of-link-title/#findComment-155506 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.