Forum Moderators: open
BODY {background-image: url(something.jpg);
background-repeat: no-repeat;
background-color: #F6F4FB;}
The problem is that the transition from image to background colour is very visible. My background image becomes coarse (visible squares) and the border is transformed into 248,248,255. On the other hand the background-colour is a mixture of (248,248,255), (248,240,248), (240,240,248) and (248,248,248)
I have the problem with IE& as well as with Firefox. So what is the moral? Should I only use colours that are divisble by eight?
Limiting your color choices to "divisible by 8" will not necessarily avoid the above problem, or the color rendering differences that are introduced by browsers, compared to a program like Photoshop.
I've found the best approach is testing by eye. In some color neighborhoods, the eye and brain are simply less sensitive than others and most people cannot discern small color shifts whereas a similar shift in another color neighborhood will jump out at you.
visible squares
This sounds like compression artifacts generated by the jpg compression algorithm. Try a higher percentage (less compression) when you generate the jpg from its source file. This will also limit any color shifts that are occurring. Or, if your image allows you to, use gif compression and fix the colors of the border to those you want to match.
Thanks for answering. I thought there was a simple solution, which everybody in the world, except me, knew about :)
I've found the best approach is testing by eye.
This sounds like compression artifacts generated by the jpg compression algorithm.
Precisely, but there's nothing wrong with the image itself. It's just that IE6, Firefox and NS4 uglifies it.
body {
background-image: url(images/yourimage.gif);
background-repeat: repeat;
}
That will give you a solid page background using your image with the correct color.
Then position a heading image, or text as normal and it will appear "over" your tiled background image. If you use the same color for the small tiled image as for your heading image for example, the color match will be perfect and you won't see any color change or seams.
Jimmy
Hagstrom, perhaps you can nest divs (or tables) and assign a single color image to tile in the parent container's background, then use the jpg to display in the nested container's background.