index.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Masterlink International</title>
</head>
<link href="frontpage.css" rel="stylesheet" type="style/css" />



<div id="body">
<body>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris consectetur nunc quis orci feugiat a semper lectus interdum. Aliquam ipsum metus, mollis sed commodo nec, blandit nec tortor. Nulla eget massa sem. Nullam cursus libero eu massa consectetur et fringilla lectus sodales. Ut tempor, eros vel consequat convallis, erat nulla convallis ipsum, id rutrum ipsum ante eget leo. Vivamus hendrerit auctor tortor ut dapibus. In nec lorem diam, hendrerit pretium diam. Nulla varius porta congue. 
</body>

</div>

</html>

Hey, I wonder why background's image does not appears


frontpage.css

@charset "utf-8";
/* CSS Document */

body {
	background-image: url(Background.jpg);
}

The link is correct but I cannot see my background image in IE. I can see it in my Dreamweaver.

you should not add div tag before body tag

<div id="body">
<body>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris consectetur nunc quis orci feugiat a semper lectus interdum. Aliquam ipsum metus, mollis sed commodo nec, blandit nec tortor. Nulla eget massa sem. Nullam cursus libero eu massa consectetur et fringilla lectus sodales. Ut tempor, eros vel consequat convallis, erat nulla convallis ipsum, id rutrum ipsum ante eget leo. Vivamus hendrerit auctor tortor ut dapibus. In nec lorem diam, hendrerit pretium diam. Nulla varius porta congue.
</body>
 
</div>

Just remove the div it should work, if it did not work try the following css, but you should remove div tag before body

body
{
 background: url(background.jpg)
}

The CSS should be:

body {
 background: url("background.jpg");
}

I've put a semi-colon and double quotes.

It only works when I place this in the same file:

<style type="text/css">
body {
	background: url("Background.jpg");
}
</style>

It does not work when I write it in frontpage.css

Why is it?

try placing your images in an images folder and executing your code as follows:

background-image: url(../Images/sample.jpeg);

let me know if that helps!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.