Background-image fails

CS4 this is my Main.css page

@charset “utf-8”;
/* CSS Document */

body {
{background-image: url(…/Images/Blinds1.png)
{


I’ve tried a hundred times.

This image doesn’t show in the Index.html page

I’ve recreated the image url many times. The image is there and the path is correct.

HTML DOCUMENT . . .

<!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>Properties With Style Home Page</title>
<link rel=“stylesheet” href=“CSS/Main.css” type=“text/css” media=“screen”>
</head>

<body>

<h3>The Sellers Advantage</h3>

</body>
</html>

There is NO CLEAR CUT info on the Internet.

Thanks.

Rick

Hi Rick,

Where is your images folder in relation to 1) your style sheet, and 2) your index page?

EDIT: O, wait: change the rule from this

body {
[COLOR="Red"]{[/COLOR]background-image: url(../Images/Blinds1.png)
[COLOR="Red"]{[/COLOR]

to

body {
    background-image: url(../Images/Blinds1.png);
[COLOR="Red"]}[/COLOR]

Thanks Ralph. That did it! Such a simply mistake for me.

I gotta say - there is so much information, most with tyrants of confusing explanations that it’s throughly daunting to sort out!

For lay people such as myself it’s best to give a SIMPLE SYNTAX example. We are not designing NASA quality Internet sites to start with.

This is the easiest way to advance and obtain understanding over time.

One more thought. Suggestions are always given without the benefit of WHERE in the CSS page the code belongs.

Above or below the <style>, <head> body, etc.

EASY explanations would assist greatly.

Thanks for your suggestion Ralph.

I will continue to learn tomorrow.

Rick

My response to that—being from a teaching background—is that you could approach this whole area better. It sounds like you are trying to learn CSS layouts from all the random tips and discussions spread far and wide across the web. While these resources are great, they are not designed to provide a comprehensive, well-structured introduction to a subject. In my view, that’s where books come into their own. A well-written book will take you step-by-step through a subject like CSS, building up concepts on a solid foundation. Then you can go searching online and build on your understanding with the basic framework in place. Without that, you can end up all at sea.

For lay people such as myself it’s best to give a SIMPLE SYNTAX example. We are not designing NASA quality Internet sites to start with … Suggestions are always given without the benefit of WHERE in the CSS page the code belongs.

You can always specify your level of skill when asking a question. If people here explained where CSS rules go every time they answered a post, things would get quite tedious and repetitive. And we are all lay people, really. :slight_smile:

I’ve purchase a book from SitPointe for SQL written by Rudy Lymbeck.

Is there a rudimentary book you, or others would suggest that I acquire?

Thanks Ralph.

SitePoint has several good books for this purpose, such as

Build Your Own Web Site The Right Way Using HTML & CSS, 2nd Edition - SitePoint Books

I also started with Stylin’ with CSS, which I highly recommend.