View Full Version : break in alt tag?
pixelmonkey
07-12-2004, 04:58 PM
i need to have multiple lines in my alt tag.
it will be for listing an address, 4 lines total.
i know this will take some javascript, but i'm looking for some direction.
time is tight, and i'm all freakin out because my new laptop's hard drive is making a chattering and dinging noise. :eek:
DUDE! i just got owned by my new Dell!:rolleyes:
chris<pixelmonkey>:monkey:
I think a title tag will let you do that.
coothead
07-12-2004, 06:46 PM
Hi there pixelmonkey,
alt and title will not work like that.
Here is a little tooltip that you can easily customize
to suit your requirements...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>tooltip</title>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
<style type="text/css">
/*<![CDATA[*/
body {
background:#000080;
}
#foo {
position:absolute;
top:166px;
left:230px;
width:140px;
height:50px;
border:solid 1px #000000;
background:#ddcc99;
padding:5px;
font-family:arial;
font-size:10px;
display:none;
}
#image {
width:200px;
height:216px;
}
/*//]]>*/
</style>
<script type="text/javascript">
//<![CDATA[
function toolTip() {
document.getElementById("foo").style.display="block";
document.onmouseout=function() {
document.getElementById("foo").style.display="none";
}
}
//]]>
</script>
</head>
<body>
<div><img id="image" src="http://hstrial-dbayly.homestead.com/files/dog.jpg"
alt="" onmouseover="toolTip()"/></div>
<div id="foo">This is line one,<br />This is line two,<br />
This is line three,<br />This is line four.</div>
</body>
</html>
Jon Hanlon
07-12-2004, 08:54 PM
Use character entities. &#13; for <CR>, &#10; for <LF>
alt="Help!&#13;&#10;I need somebody&#13;&#10;Help!&#13;&#10;Not just anybody"
coothead
07-12-2004, 10:51 PM
Use character entities. &#13; for <CR>, &#10; for <LF>
....if your only concern is for those using I.E. :D
Jon Hanlon
07-12-2004, 11:56 PM
Well, IE accounts for over 95% of users anyway.
Character entities are described in HTML 3.2 http://www.w3.org/TR/REC-html32.html so all decent browsers should support them.
coothead
07-13-2004, 03:18 AM
Hi there Jon,
Are you saying that becauase I.E. is used by over 95% of users that,
it is the only decent browser ?
Are you also saying that because the alt and the title do not expand in
a vertical direction with firefox, Mozilla, Netscape and Opera that,
they are not decent browsers ?
Are you also implying that, I.E. renders code correctly and the Others do not ?
If so, all I can say is....:D :D :D
pixelmonkey
07-13-2004, 08:15 AM
Originally posted by Jon Hanlon
Use character entities. &#13; for <CR>, &#10; for <LF>
alt="Help!&#13;&#10;I need somebody&#13;&#10;Help!&#13;&#10;Not just anybody"
thanks jon, works perfect!
Originally posted by coothead
....if your only concern is for those using I.E. :D
good point, but one last point i should have added is this page will be for beta form only. we want to present the idea and have it proven it will work the way we want it on IE 6.x . cross browser use will come in later.
bad me.
chris<pixelmonkey>:monkey:
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.