|
Posted by mr_burns on August 6, 2004, 8:25 am
Please log in for more thread options
hi,
in html, how do i create a pop up description box for text. i want, in
the same way that when you write the image alt tag and the user rolls
the cursor over the image a pop up box appears, but for text. any
help?
cheers
burnsy
|
|
Posted by Chris Morris on August 6, 2004, 4:47 pm
Please log in for more thread options
bissatch@yahoo.co.uk (mr_burns) writes:
> in html, how do i create a pop up description box for text. i want, in
> the same way that when you write the image alt tag and the user rolls
> the cursor over the image a pop up box appears, but for text. any
> help?
1) There's no such thing as an alt _tag_. You mean alt attribute.
2) That's not what the alt attribute is for, read
http://ppewww.ph.gla.ac.uk/%7Eflavell/alt/alt-text.html
Mozilla and other recent browsers do not display the alt attribute
when the image is being displayed.
3) You want the title attribute (can be used on images too)
<p title="description"> ... </p>
<img src="logo.jpg" alt="Widget Corp." title="Providing Widgets Worldwide">
--
Chris
|
|
Posted by Mark Tranchant on August 6, 2004, 4:47 pm
Please log in for more thread options mr_burns wrote:
> in html, how do i create a pop up description box for text. i want, in
> the same way that when you write the image alt tag and the user rolls
> the cursor over the image a pop up box appears, but for text. any
> help?
<span title="Popup text">blah blah</span>
....or any other element you want. Assign a class to the element, and
style it so that the user knows to mouseover it. See also <abbr> and
<acronym>.
--
Mark.
http://tranchant.plus.com/
|
|
Posted by Alan J. Flavell on August 6, 2004, 5:09 pm
Please log in for more thread options On Fri, 6 Aug 2004, Mark Tranchant wrote:
> <span title="Popup text">blah blah</span>
Good answer, as far as it goes ;-)
>
> ...or any other element you want.
Yes, preferably, *any* other element, if there's an appropriate one.
Keep <span> as the last resort. Don't you agree?
> Assign a class to the element, and style it
> so that the user knows to mouseover it.
A dotted box seems to be a fairly conventional clue. I'm not sure
I can think of a better one. Cursor=help is no use by itself, if the
user had no motive to go mousing over it anyway - this is supposed to
be information, not a treasure hunt (as I'm sure you'd agree, right?)
> See also <abbr> and <acronym>.
Fine things, in theory, yes. But IE refuses to support <abbr>, and
quite what an <acronym> is exactly, has been the topic of numerous
acr..ymonious (sorry!) arguments, unfortunately. (Which I'd rather
not start all over again here, thanks ;-)
But don't forget <dfn title="defining instance">dfn</dfn>
I give you, for instance:
abbr, acronym, dfn, .abbr { border: 1px dotted #666;
background-color: #eee; color: #030;
border-top: none; cursor: help; }
with non-acronym abbreviations done as e.g
<span class=abbr title="Windows Task Force"><abbr
title="Windows Task Force">WTF</abbr></span>
on the days when I'm feeling generous towards IE users.
all the best
(Yes, it -was- meant to be a joke)
|
|
Posted by Neal on August 6, 2004, 12:53 pm
Please log in for more thread options wrote:
> A dotted box seems to be a fairly conventional clue. I'm not sure
> I can think of a better one.
I'd use just a dotted underline. Left and right margins on inline elements
get weird when wrapped.
|
| Similar Threads | Posted | | Text and Image inside table | Alight Text Left and Image right in same cell ?? | October 24, 2006, 12:55 am |
| How to define an absolute overall text style class ? | May 9, 2007, 4:59 am |
| Adjust style on ABBR or ACRONYM alternate text | May 11, 2005, 2:47 pm |
| Need help changing anchor text color in this style declaration | April 19, 2006, 11:28 am |
| ALT image for text? | February 28, 2005, 10:40 am |
| Image flush with text input box | November 19, 2006, 9:42 am |
| Image maps and area alt text | June 14, 2007, 8:08 am |
| how to float image surrounded by text on 4 sides | February 20, 2005, 8:17 pm |
| Problem positioning text over an centered image | September 22, 2005, 6:07 pm |
| Newby image/ text wrap question | December 18, 2006, 4:46 am |
|