View Full Version : Image overlayed over text (but text visible if image disabled)?


Kaylee Skylyn
07-25-2012, 05:47 PM
I know I saw a way to do this in a web page before and I'd like to try it for an ePUB to maintain accessibility etc but cannot find the reference now.

Has anyone done this in an ePUB?

Specifically I am thinking of the first letter in a chapter. Instead of dropcaps I have a fancy image of the letter but if for some reason the letter is not visible, or someone is using a dictator I want the letter to still BE there (because not all will read the "alt" info of an image). I also thought I had an example of such in an epub but apparently not...Three Men in a Boat does have the nice image first letters but I'm not seeing code that shows the letter still there (other than the alt attribute in the image tag). I dug through some of the code snippet pages but didn't see anything (and much of the code snips do not have an accompanying example image that would greatly help me spot what code I'm looking for. Pet peeve there.)

Help?

Jellby
07-26-2012, 04:10 AM
I guess something could be done, but what if the image is partially transparent? you'd see the letter behind it (forcing a white background on the image may not be a good idea if the user is not using a white page background). Also, the z-index CSS property, that would be useful for this, is not supported by ePub 2.01.

mrmikel
07-26-2012, 06:41 AM
Please check out anything you do in your Sony 350. There are things that might look to work on Sigil or other program that will create problems on your Sony. Just download some of the epubs from gutenberg.ca and you will see the effect -- One big letter and your first sentence jammed to the right side of the page.

Kaylee Skylyn
07-26-2012, 04:28 PM
Jellby : Yes the images would have to be solid for it to work. (and I don't foresee needing to use partially transparent images in my situation). I thought for sure I had a way to do it but must not have bookmarked it...

mrmikel: yes, I will test before releasing to the wilds.

Jellby
07-27-2012, 05:52 AM
Maybe this is useful for you: http://www.pgdp.net/wiki/Accessibility_Recipes/Dropcaps

But the code may not work so well in ePub readers, and the amount to move the text changes from letter to letter (and font to font!).

I wonder if it's better to have duplicated code toggled through media types (assuming this is supported by ePub readers and text-to-speech software).

Kaylee Skylyn
08-01-2012, 05:27 PM
Thanks Jellby!

That looks like it may work...but you're right, I could see it having issues with lots of eReaders....ignoring one or both of the codes cause it to mess up easily...maybe I'll leave off it for now (wait for eReaders and their OS to finally follow standards like they should....oh look a flying pig.)