Mobileread
Book viewer displays background incorrectly
#1  dator 09-16-2018, 05:14 PM
Hello,

I set up background in book viewer using user style sheet but background is displayed on first 3 pages of each chapter.

My settings

Code
body { background-image:url("https://xxx/pics/background.jpg");
background-size:100% 100%;
background-repeat:no-repeat;
background-attachment:fixed;
background-position:center
calibre_viewer_1.PNG 
Reply 

#2  kovidgoyal 09-16-2018, 10:17 PM
You need the background to repeat. THis is because the viewer creates pages by converting the body into columns using css 3 columns properties. So the body stretches off the screen from left to right.
Reply 

#3  dator 09-17-2018, 05:47 AM
Quote kovidgoyal
You need the background to repeat. THis is because the viewer creates pages by converting the body into columns using css 3 columns properties. So the body stretches off the screen from left to right.
I understand I suppose to change background-repeat:no-repeat to background-repeat:repeat

Yet this does not work.
Reply 

#4  kovidgoyal 09-17-2018, 09:57 AM
I have to say I have never actually tried using background image with the browser viewer. I'd start with something simple like:

Code
html {
background-image: whatever;
background-size: 100vw 100vh;
}
Reply 

Today's Posts | Search this Thread | Login | Register