Quote:
Originally Posted by bbacle
Is there a way when creating an ebook that I can have a background color [...] behind my text
|
Yes, you'll want to use the
background-color CSS:
HTML:
Code:
<div class="red">
<p>This is going to have a red background.</p>
</div>
<p class="blue">This is a blue background too.</p>
CSS:
Code:
div.red {
background-color: red;
}
p.blue {
background-color: blue;
}
Quote:
Originally Posted by Quoth
But consider if it's a good idea. Usually it's not.
|
Yes, I agree.
It would be good to know WHY bbacle is trying to get a color/image as the background... then we can give more details.
Quote:
Originally Posted by bbacle
Is there a way when creating an ebook that I can have [...] image behind my text?
|
Putting images behind text is a horrible idea + very buggy.
For all the details, see this previous discussion:
Quote:
Originally Posted by JSWolf
If there's a chance this ePub will be read on an eInk screen, don't do it with a background color or image. It will most likely not work well.
|
Agreed. Strongly advise against using colored backgrounds.
If you do use colors, you have to be very careful with contrast between font+background color.
And remember, people do read using things like Night Mode.
For more info on that, see:
And if you want to see the "colored box" CSS I used way back when, you can see:
Not much has changed on that front.