Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 01-18-2011, 10:20 AM   #1
dieda1821
Junior Member
dieda1821 began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jan 2011
Device: Sony PRS-650
a:hover .child - does not work properly on ADE

Dear all,

I tried the following xhtml+css valid code:

XHTML FILE

<a href="#" alt="" class="trial">Trial<span class="red">Red text</span></a>

CSS FILE

a.trial:hover .red{
color:red;
}

This should make the "Red text" red coloured when hovering either the text "Trial" or the "Red text" one.

If I insert this code in the xhtml and css files inside an .epub, the :hover class does not work properly in ADE: it is somehow shifted to the span.red element only, and hovering the text "Trial" does not produce any effect.

In fact, "Red text" becomes red coloured when hovering itself only.

In ADE:

a.trial:hover .red{
color:red;
}

and

.red:hover{
color:red;
}

are rendered at the same way.

Does anyone know why this happens and how I could have, in ADE, something happening at a text when hovering, or eventually clicking, another element ?

I also posted the question in the ADE assistance forum (although it is too technical maybe).

Thanks in advance

Elena
dieda1821 is offline   Reply With Quote
Old 01-18-2011, 01:47 PM   #2
pholy
Booklegger
pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.
 
pholy's Avatar
 
Posts: 1,801
Karma: 7999816
Join Date: Jun 2009
Location: Toronto, Ontario, Canada
Device: BeBook(1 & 2010), PEZ, PRS-505, Kobo BT, PRS-T1, Playbook, Kobo Touch
The last time I read through the ADE Guide, it recommended against using any dynamic elements, so they may not have been terribly well designed or tested. Most people here will be using e-ink devices, so dynamic elements are pretty much out of the question. I guess they might work on iPads or Color Nooks, and the desktop ADE, of course (but they don't...). I think you will have to experiment and report back, and perhaps some of the more knowledgeable members can help sort things out with you.
pholy is offline   Reply With Quote
Advert
Old 01-19-2011, 04:34 AM   #3
dieda1821
Junior Member
dieda1821 began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jan 2011
Device: Sony PRS-650
Hi,

Thanks for your reply. The desktop ADE is not rendering the :hover properly and I was curious to see the behaviour of my Sony PRS-650, but that would have been a secondary task.

Do you know where can I report about the desktop ADE ? It seems the Adobe Digital Edition forum is not the more appropriate place (most of the comment are about trouble when authorizing e-readers)...

Elena

Quote:
Originally Posted by pholy View Post
I guess they might work on iPads or Color Nooks, and the desktop ADE, of course (but they don't...). I think you will have to experiment and report back, and perhaps some of the more knowledgeable members can help sort things out with you.
dieda1821 is offline   Reply With Quote
Old 01-19-2011, 08:33 AM   #4
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
I am afraid you need to report it at Adobe. Don't expect to have an update soon though. I am not sure if :hover is specified in the epub-specs. If not, that the behaviour is as it should be. Not everything that works in xhtml is supposed to work in an epub.
Toxaris is offline   Reply With Quote
Old 01-19-2011, 10:55 AM   #5
dieda1821
Junior Member
dieda1821 began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jan 2011
Device: Sony PRS-650
Quote:
Originally Posted by Toxaris View Post
I am afraid you need to report it at Adobe. Don't expect to have an update soon though. I am not sure if :hover is specified in the epub-specs. If not, that the behaviour is as it should be. Not everything that works in xhtml is supposed to work in an epub.
I found here

http://www.idpf.org/doc_library/epub...htm#Section2.2

the following:

"Reading Systems must support all CSS2 selectors., including pseudo-elements and pseudo-classes. However, certain pseudo-classes may not be applicable to all Reading Systems (e.g. hover for devices with a touch screen) and may not result in any rendering on such devices"

Therefore I expected some troubles with the :hover effect on my e-reader, but not on my desktop ADE.

It's a pity, that would have been at least a chance of inserting a (moderately) dynamic note in my epub (with css :hover and the display property, as for the css dropdown menu).

I can not understand why the epub standard tend to completely avoid any kind of scripting or dynamic event (like the onclick handling).

Besides, the footnotes in paper book are quite boring and the internal links in epub tend to distract the reading (especially when one has to carefully tap a tiny tiny number on the screen such as my Sony, and to tap it again to go back to the chapter).

An hidden note, to be displayed right at the word it corresponds, but just on command, would be a very nice improvement
dieda1821 is offline   Reply With Quote
Advert
Old 01-19-2011, 11:43 AM   #6
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
EPUB permits rendering to be done any way the hardware wants to do it. It is certainly possible for an eBook Reader to render a footnote right on the page as an overlay like you want if the user clicks on it. This really has nothing to do with the hover CSS capability.
DaleDe is offline   Reply With Quote
Old 01-20-2011, 04:17 AM   #7
dieda1821
Junior Member
dieda1821 began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jan 2011
Device: Sony PRS-650
Quote:
Originally Posted by DaleDe View Post
EPUB permits rendering to be done any way the hardware wants to do it. It is certainly possible for an eBook Reader to render a footnote right on the page as an overlay like you want if the user clicks on it. This really has nothing to do with the hover CSS capability.
I am afraid, but it seems that this is not completely true, as you can also read in the thread of this forum here:

https://www.mobileread.com/forums/sho...d.php?t=115057

The :hover pseudo-class was a trial to add some dynamic content and, as it is part of the standard, I expected it to work wherever "hovering" means something (-> a desktop pc).

Then if you want to state that the problem is not of the format itself but in the way ADE (or the e-reader) renders the code, that is true, but it makes no difference if one wants to produce an epub that is not "device dependant".
dieda1821 is offline   Reply With Quote
Old 01-20-2011, 02:53 PM   #8
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Ah, but ADE is not the same as the IDPF. ADE is an interpretation of the EPUB specs according to Adobe. And, as alsmost everything, it is not perfect.
Toxaris is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hyperlinked images don't work in ADE hpstricker ePub 6 11-26-2010 06:38 PM
Changing colors of "hover over" balloons mark121 Calibre 2 11-23-2010 04:34 PM
How to properly format links so they validate and work, too? justbobf ePub 5 07-15-2010 07:57 PM
Not charging properly GoneNova Bookeen 4 08-27-2008 07:47 AM


All times are GMT -4. The time now is 11:39 AM.


MobileRead.com is a privately owned, operated and funded community.