Click here to get back home

special pop-up

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
special pop-up =?ISO-8859-1?Q?Fran=E7ois_Patt 10-07-2007
---> Re: special pop-up André Gillibert10-07-2007
Get Chitika Premium
Posted by =?ISO-8859-1?Q?Fran=E7ois_Patt on October 7, 2007, 1:50 pm
Please log in for more thread options
Bonjour,

I would like to know if it is possible to create some pop-up appearing
when the mouse is over a text zone (and desappearing when the mouse goes
outside this zone) with this specification: the pop-up has no border at
all, it is like the help pop-up we can see when the mouse is over a
button of a web browser for instance. But, I need to master the size,
the position, the color background, the text of course...

My idea is to present a text translation, paragraph by paragraph, and,
if we put the mouse over a paragraph, it open a pop-up with the original
text inside.

I have seen some example using javascript, but there is a frame around
the pop-up....

Thanks for any idea.
--
François Patte
Université Paris 5 - Paris

Posted by Ben C on October 7, 2007, 4:44 pm
Please log in for more thread options
> Bonjour,
>
> I would like to know if it is possible to create some pop-up appearing
> when the mouse is over a text zone (and desappearing when the mouse goes
> outside this zone) with this specification: the pop-up has no border at
> all, it is like the help pop-up we can see when the mouse is over a
> button of a web browser for instance. But, I need to master the size,
> the position, the color background, the text of course...
>
> My idea is to present a text translation, paragraph by paragraph, and,
> if we put the mouse over a paragraph, it open a pop-up with the original
> text inside.
>
> I have seen some example using javascript, but there is a frame around
> the pop-up....
>
> Thanks for any idea.

Make the pop-up first, in its popped-up state. Style it how you want it.
Then make it visibility: hidden. Then make it visibility: visible but in
a selector (probably a descendent selector) with :hover on the element
they hover on.

Here's an example. No guarantee is made about how much or little of it
works in IE, but there's no other way to do this without JavaScript.

You can of course use JavaScript to toggle visibility instead if the
descendent pseudoselector doesn't work in IE. But toggling visibility is
what facilitates the Web 2.0 popup style without any borders.

<style type="text/css">
.sample
{
position: relative; /* so it's positioned containing block */
}
.translation
{
background-color: yellow;
color: black;

/* offset 1em,1.2em from containing block */
position: absolute;
top: 1.2em;
left: 1em;

padding: 0.5em;
visibility: hidden;
white-space: nowrap;
}

/* Make .translation visible when they hover on .sample */
.sample:hover .translation { visibility: visible; }
</style>

...

<span class="sample">
Have a nice day!
<span class="translation">
Bonne journée!
</span>
</span>

Posted by André Gillibert on October 7, 2007, 5:28 pm
Please log in for more thread options
François Patte wrote:


> My idea is to present a text translation, paragraph by paragraph, and,
> if we put the mouse over a paragraph, it open a pop-up with the original
> text inside.

Something like that?

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>Ugly CSS pop-up</title>
<style type="text/css">
table.translation > tbody > tr
,table.translation > tbody > tr > td {
display: block;
}
table.translation > tbody > tr > td {
position: absolute;
top: auto;
left: 3em;

visibility: hidden;

background-color: yellow;
color: black;
}
table.translation > tbody > tr > td:first-child {
position: static;
top: auto;
left: auto;

visibility: visible;

background-color: inherit;
color: inherit;
}
table.translation > tbody > tr:hover > td {
visibility: visible;
}
</style>
<body>

<table class=translation>
<tr>
<td lang=en>Some english character strings
<td lang=fr>Des chaînes de caractère en anglais
<tr>
<td lang=en>And their french translations
<td lang=fr>Et leur traduction en français
<tr>
<td lang=en>In a translation table
<td lang=fr>Dans une table de traduction
<tr>
<td lang=en>Presented with an inconvenient mouse-driven layout
<td lang=fr>Présenté sous un rendu peu utilisable, basé sur la
manipulation de la souris.
</table>

</html>

--
If you've a question that doesn't belong to Usenet, contact me at

Posted by =?ISO-8859-1?Q?Fran=E7ois_Patt on October 8, 2007, 2:48 am
Please log in for more thread options
André Gillibert a écrit :
> François Patte wrote:
>
>
>> My idea is to present a text translation, paragraph by paragraph, and,
>> if we put the mouse over a paragraph, it open a pop-up with the original
>> text inside.
>
> Something like that?

Yes! thanks, but I am wondering why the example given by Ben C is not
working for me? It is much more simpler (and more understandable for
me...!). Is something missing? Or not working with firefox?


>
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
> <html>
> <head>
> <title>Ugly CSS pop-up</title>
> <style type="text/css">
> table.translation > tbody > tr
> ,table.translation > tbody > tr > td {
> display: block;
> }
> table.translation > tbody > tr > td {
> position: absolute;
> top: auto;
> left: 3em;
>
> visibility: hidden;
>
> background-color: yellow;
> color: black;
> }
> table.translation > tbody > tr > td:first-child {
> position: static;
> top: auto;
> left: auto;
>
> visibility: visible;
>
> background-color: inherit;
> color: inherit;
> }
> table.translation > tbody > tr:hover > td {
> visibility: visible;
> }
> </style>
> <body>
>
> <table class=translation>
> <tr>
> <td lang=en>Some english character strings
> <td lang=fr>Des chaînes de caractère en anglais
> <tr>
> <td lang=en>And their french translations
> <td lang=fr>Et leur traduction en français
> <tr>
> <td lang=en>In a translation table
> <td lang=fr>Dans une table de traduction
> <tr>
> <td lang=en>Presented with an inconvenient mouse-driven layout
> <td lang=fr>Présenté sous un rendu peu utilisable, basé sur la
> manipulation de la souris.
> </table>
>
> </html>
>


--
François Patte
Université Paris 5 - Paris

Posted by Ben C on October 8, 2007, 3:08 am
Please log in for more thread options
[...]
> Yes! thanks, but I am wondering why the example given by Ben C is not
> working for me? It is much more simpler (and more understandable for
> me...!). Is something missing? Or not working with firefox?

Under the terms of the guarantee it should work in Firefox.

Try this url: http://www.tidraso.co.uk/misc/popup2.html

Similar ThreadsPosted
CSS popup tooltips June 15, 2005, 8:37 am
scrollbar won't add to popup window July 22, 2004, 1:57 pm
animated gif stops when used as a link to a popup March 11, 2006, 11:48 am
Validation errors: Popup or errorline ? November 25, 2006, 7:19 pm
code to popup link in new browser window January 2, 2005, 10:05 pm
Is there soemthing called modal popup windows? May 16, 2007, 8:36 am
HTML Form post to popup-window January 22, 2008, 10:41 pm
How to remove automatic printing popup from saved web page? July 3, 2005, 10:52 am
& special characters May 29, 2006, 6:48 am
What special character notation is this October 22, 2004, 5:07 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap