|
Posted by dorayme on 08/03/07 07:05
In article
<1186122493.857897.126340@o61g2000hsh.googlegroups.com>,
Nikolay Kurtov <nkurtov@gmail.com> wrote:
> I have index.html, style.css, image.png in one folder.
>
> in index.html I include style.css
> <head>
> <title>Newbie question</title>
> <meta http-equiv="content-type" content="text/html; charset=utf-8" /
> >
> <link href="style.css" rel="stylesheet" type="text/css" />
> </head>
>
>
> In style.css I set the background:
>
> body{
> background-image:url("image.png");
> }
>
>
> But the image doesn't load.
> How should I correct the url in css?
Perhaps you have made a spelling mistake or a space in the name,
case can be important including in the ".png"? Are you loading to
a free webhost? Try this on your local machine for your
index.html:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Newbie question</title>
<meta http-equiv="content-type" content="text/html;
charset=utf-8">
<style type="text/css">
body {background: #f00 url("image.png");
</style>
</head>
<body>
</body>
</html>
And see if you see red. Try a different image, one that
definitely opens when you drag the image file itself to the open
browser window.
--
dorayme
Navigation:
[Reply to this message]
|