View Single Post
Old 01-30-2013, 12:58 PM   #170
dob
Junior Member
dob began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jan 2013
Device: Kindle
Angry Background colour

I tried copying and pasting this code into the Calibre stylesheet and got a completely white page with no printing on it.
Whatever I try in background-color:rgb(0,0,0); doesn't change the background colour.
Changing the color changes the print color. What is going wrong?
I am a complete greenhorn with regard to this programming.
I am running Windows 7 on a Acer laptop. Please help.

Quote:
Originally Posted by ekaser View Post
You have an error in there. I was testing out a completely different color scheme (harking back to the "good old" MS-DOS days), when I used WHITE on BLUE background for my console (worked better then, with fixed pitch, large fonts :-). In your code above, you need to add a ':' after the body 'color' name. Without it, the body (text) color is ignored. It still works for what you want, because the default color is black. But it doesn't work if you try to set it to anything else. Not necessarily pleasing to use, but as another example, here's my "white on blue" style:

body {
color: rgb(255,255,255);
background-color:rgb(0,0,255);
text-align:justify;
line-spacing:1.8;
margin-top:0px;
margin-bottom:4px;
margin-right:50px;
margin-left:50px;
text-indent:2em;
}
h1, h2, h3, h4, h5, h6 {
color:white;
text-align:center;
font-style:italic;
font-weight:bold;
}
dob is offline   Reply With Quote