Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 12-12-2012, 04:54 PM   #1
FunkeXMix
Enthusiast
FunkeXMix began at the beginning.
 
Posts: 39
Karma: 10
Join Date: Aug 2011
Device: Ipad
Page Background Color in iBooks.

Hi all,

I was wondering if 'css: background: black', for example is supported on Apple devices (epub). The original I am creating my eBook from has a couple of pages with black backgrounds and white text which I would like to recreate.

Also, would this pose any problem for acceptance to iBooks?

Thank you very much!
FunkeXMix is offline   Reply With Quote
Old 12-12-2012, 08:59 PM   #2
Aerys
Connoisseur
Aerys is faster than slow light.Aerys is faster than slow light.Aerys is faster than slow light.Aerys is faster than slow light.Aerys is faster than slow light.Aerys is faster than slow light.Aerys is faster than slow light.Aerys is faster than slow light.Aerys is faster than slow light.Aerys is faster than slow light.Aerys is faster than slow light.
 
Aerys's Avatar
 
Posts: 51
Karma: 29994
Join Date: Nov 2011
Location: Manila, Philippines
Device: iPad 2 & Nexus 7
Yes it's supported by iBooks but the correct CSS should be "background-color:black" and no issue with submitting it to iTunes.
Aerys is offline   Reply With Quote
 
Enthusiast
Old 12-13-2012, 06:11 AM   #3
FunkeXMix
Enthusiast
FunkeXMix began at the beginning.
 
Posts: 39
Karma: 10
Join Date: Aug 2011
Device: Ipad
Thanks for the answer but I am still a bit uneasy about it due to reading old topics about it: http://www.mobileread.com/forums/sho...d.php?t=128117

Can someone confirm it works? Is text background and background image supported as well? I know these things work in KF8.

I needed to ask here because I could not find a source for it on google. Anybody know a page listing all supported CSS for iBooks?

Btw, at least for me this thread pops up when searching 'ibooks background color' on the first page with no other useful links. So could be a good source for others looking for the same info.

Thanks.

Last edited by FunkeXMix; 12-13-2012 at 06:19 AM.
FunkeXMix is offline   Reply With Quote
Old 12-13-2012, 09:26 AM   #4
mzmm
Groupie
mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.
 
mzmm's Avatar
 
Posts: 156
Karma: 86115
Join Date: Feb 2012
Device: iPad, Kindle Touch, Sony PRS-T1
this works:

div { width:100%; height: 200px;}
.bg_img { background-image:url('img/linen.png'); background-repeat:repeat; }
.bg_color { background-color: orange; }

<div class="bg_img"></div>
<div class="bg_color"></div>

but it doesn't look like it supports the background shorthand.

edit -- forgot the image extension

this also works:

.bg_sh { background: transparent url('img/linen.png') no-repeat center center; }

<div class="bg_sh"></div>

as a caveat, you might want to test in night mode. seems like background colors (but not images) are overriden

Last edited by mzmm; 12-13-2012 at 09:33 AM.
mzmm is offline   Reply With Quote
Old 12-19-2012, 02:03 AM   #5
_savage
Connoisseur
_savage began at the beginning.
 
Posts: 50
Karma: 10
Join Date: Jul 2012
Location: Seattle, USA
Device: Nook
I used a .jpeg file as a background image for the BODY which rendered ok on the Nook (minus the white border around the display area) but it did not render in iBooks.

At the moment I am a bit where FunkeXMix come from: is it a good or acceptable approach to use background images or to color the background? I'm worried that this interferes with the reading experience and presets of a reader.
_savage is offline   Reply With Quote
Old 12-19-2012, 03:48 PM   #6
dgatwood
Curmudgeon
dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.
 
Posts: 248
Karma: 556004
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
IMO, using background color is acceptable as long as it is used sparingly for visual effect. You almost certainly should not use white-on-black for the body text of an entire book. One or two special pages in a book, however, are unlikely to annoy anyone.

I would also suggest setting !important on both the background and the color properties as a clear indication to the reading system that this is *not* ordinary body text that it can re-style at will without breaking things.

Even then, you might have a few buggy readers (Nook on iOS, I'm looking at you) that "helpfully" try to set the text color to black but don't change the background (resulting in black-on-black text). At least in the case of Nook on iOS, you can fix this by enabling publisher styles (and why that mode is not the default, I will never understand), but it is worth keeping in mind.

In iBooks on iPhone/iPad, inverted text behaves exactly as you would expect. Likewise in every other reader I tried except for Nook. *ahem*
dgatwood is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Text color and background color almost the same larrymohr Kobo Tablets 2 11-20-2011 06:59 PM
Background color marcelo2605 Sigil 7 04-05-2011 05:51 PM
A page background color for less eyestrain? racsw Library Management 13 03-01-2011 12:15 PM
Background color when reading swallman Nook Color & Nook Tablet 2 02-03-2011 01:09 PM
change book page background color jtpryan Nook Color & Nook Tablet 1 01-26-2011 04:13 PM


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


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