You are here: Re: Newbie question « HTML « IT news, forums, messages
Re: Newbie question

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация