NathanFeaver
08-01-2011, 08:05 PM
Hi all,
I'm trying to build a personal website. My first big hurdle has been getting images to display properly with CSS. I have been unable to get a background image to appear when adding to the body element as well as specific div or in-line elements.
I think the problem might be because I am testing the website locally on my computer. Maybe Firefox is assuming that the image is supposed to be found online from the url but even when I use the full url (file:///C/...image.gif) it does not appear.
I am using Firefox 5.0 to preview my website. Any help/ideas would be greatly appreciated. Here is a sample of the code that I'm using:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>test page</title>
<style type="text/css" media="screen">
body {
background-image: url(image.gif);
}
</style>
</head>
<body>
</body>
</html>
I'm trying to build a personal website. My first big hurdle has been getting images to display properly with CSS. I have been unable to get a background image to appear when adding to the body element as well as specific div or in-line elements.
I think the problem might be because I am testing the website locally on my computer. Maybe Firefox is assuming that the image is supposed to be found online from the url but even when I use the full url (file:///C/...image.gif) it does not appear.
I am using Firefox 5.0 to preview my website. Any help/ideas would be greatly appreciated. Here is a sample of the code that I'm using:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>test page</title>
<style type="text/css" media="screen">
body {
background-image: url(image.gif);
}
</style>
</head>
<body>
</body>
</html>