navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

Backround-image not appearing

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> Cascading Style Sheets >> Backround-image not appearing
Page: [1]
 
Nessie

 

Posts: 7
Joined: 2/7/2006
Status: offline

 
Backround-image not appearing - 2/7/2006 10:49:19   
I am new to CSS and am using Frontpage 2000 to build a site on a private intranet. I have created an external css file using notepad and imported it into FP2000 to add a background image but its not appearing in either normal or preview screens. The image is stored in the webs images folder. I have created another css file which works and both have been linked to the page. I can insert the background using FP but thought it would be better to use css. In my head tags I have typed:

<style type="text/css">
body{background-image: url ('../images/logo.jpg)}
</style>

I have tried changing the image address to include full file location and also moved it to the same location as the css file but all have been unsuccessful.
rdouglass

 

Posts: 9227
From: Biddeford, ME USA
Status: offline

 
RE: Backround-image not appearing - 2/7/2006 11:02:12   
quote:

body{background-image: url ('../images/logo.jpg)}


body{background-image: url ('../images/logo.jpg')}

(See it?)

EDIT: Hi and Welcome to OutFront. :)

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to Nessie)
Nessie

 

Posts: 7
Joined: 2/7/2006
Status: offline

 
RE: Backround-image not appearing - 2/7/2006 11:11:53   

quote:

ORIGINAL: rdouglass

body{background-image: url ('../images/logo.jpg')}

(See it?)


Oops, that was a typing error, I have included ' marks at either end of my url link.

Well spotted!

(in reply to rdouglass)
rdouglass

 

Posts: 9227
From: Biddeford, ME USA
Status: offline

 
RE: Backround-image not appearing - 2/7/2006 11:28:09   
quote:

I have included ' marks at either end of my url link.


Does that mean that fixed it or you just posted it wrong? :):)

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to Nessie)
Nessie

 

Posts: 7
Joined: 2/7/2006
Status: offline

 
RE: Backround-image not appearing - 2/7/2006 11:44:13   

quote:

ORIGINAL: rdouglass

quote:

I have included ' marks at either end of my url link.


Does that mean that fixed it or you just posted it wrong? :):)


I wish it was that simple, unfortunately it was a typing error in my post both quotes are in my css file!:)
Thanks for your input

(in reply to rdouglass)
rdouglass

 

Posts: 9227
From: Biddeford, ME USA
Status: offline

 
RE: Backround-image not appearing - 2/7/2006 13:02:58   
Is this a Windows 2003 host server?

Can you look at this link for a simple CSS to do background images?

http://www.w3schools.com/css/tryit.asp?filename=trycss_background-image

Also, IIRC with CSS and external sheets, the path is relative to the CSS file and not the page that it is incuded on. Is this an external CSS?

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to Nessie)
rdouglass

 

Posts: 9227
From: Biddeford, ME USA
Status: offline

 
RE: Backround-image not appearing - 2/7/2006 13:05:23   
quote:

url ('../images/logo.jpg)}


Also try removing the space between url and the paren.

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to Nessie)
Nessie

 

Posts: 7
Joined: 2/7/2006
Status: offline

 
RE: Backround-image not appearing - 2/8/2006 6:42:26   
Thanks for your replies,
I have been to that website already and copied the code straight into my external css file which is linked to my html page in the head tag with:
<link rel="stylesheet" type="text/css" href="background_css.css">
I have tried removing spaces which also doesn't work, and also simply changing the background color without inserting image:
body {background-color: red}.

It is seeing the css file because it will let me change background color of text but not the page :)

(in reply to rdouglass)
Tailslide

 

Posts: 6036
Joined: 5/10/2005
From: Out here on the raggedy edge
Status: offline

 
RE: Backround-image not appearing - 2/8/2006 7:00:45   
Nessie, can you give us a link to have a look - much easier to fix it then!

I'd also get rid of the single quotes all together.

Have you tried fiddling with the path to the image at all? If the CSS file is in the same folder as your HTML document and the images are in a folder within that directory then the path should be:

background-image: url(images/yourimage.jpg);

_____________________________

"My strategy is so simple an idiot could have devised it"
Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project

(in reply to Nessie)
Kitka

 

Posts: 2515
Joined: 1/31/2002
From: Australia
Status: offline

 
RE: Backround-image not appearing - 2/8/2006 7:01:44   
quote:

It is seeing the css file because it will let me change background color of text but not the page


Are you certain you have the path to the image correct? Might it possibly be:

 body {background-image: url("images/logo.jpg")} 


I also noticed the code you quoted in an above post, has no space between "body" and opening curly parenthesis - try it with a space.

What OS are you using? I have noticed that often Macs require the quotation marks round the url, instead of apostrophes. That is worth testing.

_____________________________

Kitka
**It is impossible to make anything foolproof because fools are so ingenious.**


(in reply to Nessie)
Nessie

 

Posts: 7
Joined: 2/7/2006
Status: offline

 
RE: Backround-image not appearing - 2/8/2006 7:28:29   
Unfortunately I can't post the url because it will be located on an intranet and is also just in the development stages at the moment. I have tried changing the url address to ../images/logo.jpg & images/logo.jpg & logo.jpg and with quotes, double quotes, no quotes and removing/adding spaces, but still no luck. Although I would still expect it to let me change the background color without an image.
Would I be better to just insert the background using Frontpage page properties and inserting background. I was just trying to improve the performance before it goes live.

(in reply to Kitka)
Tailslide

 

Posts: 6036
Joined: 5/10/2005
From: Out here on the raggedy edge
Status: offline

 
RE: Backround-image not appearing - 2/8/2006 7:56:52   
You could try this:

body {background:#fff url(../images/logo.jpg) top left no-repeat;}


With the #fff being whatever background colour you want. I'm assuming a background position of top left but it could be stated in terms of pxs too.

It will work - sometimes it just takes a bit of fiddling to work out what it is that the page doesn't like.

_____________________________

"My strategy is so simple an idiot could have devised it"
Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project

(in reply to Nessie)
Nessie

 

Posts: 7
Joined: 2/7/2006
Status: offline

 
RE: Backround-image not appearing - 2/8/2006 9:15:19   
Just managed to get the background to show by embedding the style into the html of the page but still can't get it to work through the external css even though the css file, html file and image are all stored within the root folder.

(in reply to Tailslide)
d a v e

 

Posts: 4086
Joined: 7/24/2002
From: England (but live in Finland now)
Status: offline

 
RE: Backround-image not appearing - 2/8/2006 9:29:13   
try using topstyle lite ( http://www.bradsoft.com/download/ ) to handle your external stylesheet and see if that helps - you can just browse to the image and it should work fine

_____________________________

David Prescott
Gekko web design

(in reply to Nessie)
Page:   [1]

All Forums >> Web Development >> Cascading Style Sheets >> Backround-image not appearing
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts