Forum Moderators: not2easy
.color{
background: url(red.jpg);
}
And this is the html-page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta name=" " content=" ">
<link rel="stylesheet" type="text/css" href="styles.css">
<title>My Title</title>
</head>
<body>
Color
</body>
</html>
I want to use an image instead of a color because then I can have the precise color behind another image. This works perfect in Safari but Firefox doesn't seem to recognize the image at all. I've tried to extend the code with more details, but it doesn't work:
.color{
background-image: url(red.jpg);
background-repeat: repeat;
etc..etc...(this is just a sample)
}
Can someone help me?
[edited by: SuzyUK at 9:37 pm (utc) on Nov. 19, 2007]
[edit reason] examplifying some personal details [/edit]
.. try adding the color class to your HTML opening tag too
e.g.
<html class="color"> or rather than classes try something like the following in your CSS file..
html, body {background: url(red.jpg);} presuming there is no other background declarations on these elements if there is it will need a bit more
somewhere in the distant memories I think the XHTML canvas background should be on the HTML element, rather than the body however that could be completely wrong :o
-Suzy
[edited by: SuzyUK at 11:59 pm (utc) on Nov. 19, 2007]