473,395 Members | 1,872 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Good cross-browser method for tooltips?

Hi. I'd like to be able to make tooltips for some "span" elements. So
I'd do like:
<dic class="toolblock">Stuff<span class="tooltip">Something about
"Stuff"</span></div> and then use the below stylesheet:

div.toolblock span.tooltip {
display:none;
}

div.toolblock:hover span.tooltip {
display: block;
position: absolute;
top: 200px; left: 0; width: 125px;
padding: 5px; margin: 10px; z-index: 100;
background: #ffff80;
border: 1px solid;
}

I would like a more robust way that allows relative placement in
respect to the "span". What's the recommended approach?

Thanks.

Morten
Jul 21 '05 #1
2 3126
Morten wrote:
Hi. I'd like to be able to make tooltips for some "span" elements. So
I'd do like:
<dic class="toolblock">Stuff<span class="tooltip">Something about
"Stuff"</span></div> and then use the below stylesheet: [...] I would like a more robust way that allows relative placement in
respect to the "span". What's the recommended approach?


Not exactly what you ask for, as you can't design it, but extremely
cross-browser and easy to use, also for inline use: The title attribute.

span.toolblock {
border-bottom:1px dashed red;
cursor:help;
}

Hello this is my <span class="toolblock" title="Vorschlag is German for
suggestion">Vorschlag</span>.

HTH
Markus
Jul 21 '05 #2
> > I would like a more robust way that allows relative placement in
respect to the "span". What's the recommended approach?


Not exactly what you ask for, as you can't design it, but extremely
cross-browser and easy to use, also for inline use: The title attribute.

span.toolblock {
border-bottom:1px dashed red;
cursor:help;
}

Hello this is my <span class="toolblock" title="Vorschlag is German for
suggestion">Vorschlag</span>.


Excellent! Thanks! :-)
Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: mike420 | last post by:
David Rush wrote: > > You know I think that this thread has so far set a comp.lang.* record for > civilitiy in the face of a massively cross-posted language comparison > thread. I was even...
3
by: google_groups_web | last post by:
Good News! Do you know how simple it is to go to Heaven after this life has ended? Some people believe that belonging to a local church, temple, mosque or synagogue will get them to Heaven.
3
by: rollasoc | last post by:
Hi, Doing a bit of system testing on a Windows 98 laptop. (.Net 1.1 app). Did a bit of testing. Loaded a previously saved file. A gray box appeared with the text and buttons all white...
354
by: Montrose... | last post by:
After working in c# for a year, the only conclusion I can come to is that I wish I knew c. All I need is Linux, the gnu c compiler and I can do anything. Web services are just open sockets...
5
by: sandwich_eater | last post by:
I am looking for a Linux distribution and a standard C++ compiler (IDE not too important) that can also compile to Win32, to run on my Dell dimension 2400... I have trouble with new distros since...
0
by: nice_reply_only | last post by:
Good News! Do you know how simple it is to go to Heaven after this life has ended? Some people believe that belonging to a local church, temple, mosque or synagogue will get them to Heaven.
63
by: John Salerno | last post by:
I know there's a request for a good IDE at least once a week on the ng, but hopefully this question is a little different. I'm looking for suggestions for a good cross-platform text editor (which...
21
by: The Night Blogger | last post by:
Can someone recommend me a good API for writing a sexy looking (Rich UI like WinForms) shrink wrap application My requirement is that the application needs to look as good on Windows as on the...
8
by: Matt England | last post by:
My team currently using Boost Threads, but we are considering switching to ZThreads. (We seek cross-platform, C++ multithreading capabilities in an external library.) ZThread(s): ...
16
by: Lars Uffmann | last post by:
Does anyone have a good suggestion? I am currently using Eclipse Europa with the C-Development Toolkit (plus gnu-toolchain under cygwin) and the Widestudio Native Application Builder plugin. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.