I'm working on implementing CSS on my site, and have a problem with using a background image. When I use the background image inline in the PHP file, as below:
<style>
html{
background: url(images/bgimage.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
body{
font-family:"Trebuchet MS", Helvetica, sans-serif;
font-size:16px;
color:#ffffff;
}
</style>
The background image displays properly. However, when I use a separate CSS file, containing:
html {
background: url(images/ralnabg.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
body{
background-color:#0000ff;
font-family:"Trebuchet MS", Helvetica, sans-serif;
font-size:16px;
color:#ffffff;
}
The PHP page ignores the 'html' selector of the code, but does implement the 'body' selector, and I haven't been able to figure out why. I have this problem, regardless of whether I use Internet Explorer, Firefox, or Chrome.
Thanks for any suggestions you may have!
-Jay