You are here: Re: Format href title « HTML « IT news, forums, messages
Re: Format href title

Posted by Jonathan N. Little on 11/16/62 11:28

Brian Cryer wrote:

> I want to show extra information about a link and am doing this by placing a
> short narrative in the title attribute of an <a href... link. This works
> fine in Internet Explorer (and I'm hoping in other browsers - I know I
> should have checked but I've not done so yet), IE shows a tool-tip style box
> when I hover the mouse over the link. My question is whether it is possible
> to apply any formatting to this? what I'm really after is a line break, but
> if I put a <br> it comes out as part of the title.
>
> Any ideas would be appreciated. So too would be the knowledge that it can't
> be done (if it can't be done).

You cannot format the tooltip created by the title attribute, and if you
get your title text too long some (maybe all) UA's will truncate the text

There are JavaScript tooltips, but of course require JavaScript to be
enabled

You can use CSS

A .tip { display: none; }
A:hover .tip {display: inline; }
..tip DIV {
border: 1px solid black;
color: black;
background-color: #ffd;
font-size: 80%;
width: 15em;
padding: .2em;
}

<a href="#">Lorem ipsum
<span class="tip">
<div>
Lorem ipsum dolor sit amet, consectetuer ...
</div>
</span>
</a>

This will cause your text to reflow, I think I have see some examples
with position : absolute but lining up the div will be tricky...

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация