|
| |
|
|
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.
|
|
|
|
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!
|
|
|
|
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.
|
|
|
|
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.
|
|
|
|
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
|
|
|
|
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.**
|
|
|
|
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.
|
|
|
|
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
|
|
|
|
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.
|
|
|
|
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
|
|
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
|
|
|