Reply
background problem
Old 02-19-2007, 03:35 AM background problem
Novice Talker

Posts: 9
Name: Emile
I have a background problem. I have downloaded a gif-file from the Netscape page and now I want to use that as my background for all my pages on my site.
Here is the code of the external style sheet:

body {
padding:0 5%;
background-image: url(../Images/blue_paper.gif);
}

Problem with it is that it doesnt work. I dont have much knowledge of css. Is the code wrong? Do I have to add something? I hope you can help me out.

Fireworker
Fireworker is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 02-19-2007, 04:24 AM Re: background problem
King Spam Talker

Posts: 1,004
Location: Manchester, UK
Could you give more information Fireworker?

In what way doesn't it work? Do you have a link to the page so we can see the source?
gringo is offline
Reply With Quote
View Public Profile Visit gringo's homepage!
 
Old 02-19-2007, 08:39 AM Re: background problem
Novice Talker

Posts: 9
Name: Emile
The link is: http:// www.newthinking.nl/

This is how I want the pages to look like but I want to change the code. The code is now:

<body bgcolor="#FFFFFF" background="../../Images/blue_paper.gif" link="#0033FF" vlink="#993366">I made this code with Dreamweaver.

I already made an external style sheet and now I want to add the background code to it and apply it to all pages.

So I removed the above code from all webpages and added the code in the external style sheet I mentioned in the previous post. But that doesnt work.

So why doesnt it work?

Fireworker
Fireworker is offline
Reply With Quote
View Public Profile
 
Old 02-19-2007, 09:00 AM Re: background problem
King Spam Talker

Posts: 1,004
Location: Manchester, UK
You've given a link to a page that doesn't have the problem.

Have you got a page that does have the problem?
gringo is offline
Reply With Quote
View Public Profile Visit gringo's homepage!
 
Old 02-19-2007, 09:05 AM Re: background problem
Novice Talker

Posts: 9
Name: Emile
No, I encounter this problem while working in Dreamweaver. I dont want to upload half work to the site yet.

How can I achieve the same result in css as you see in the site?

Fireworker
Fireworker is offline
Reply With Quote
View Public Profile
 
Old 02-19-2007, 09:09 AM Re: background problem
King Spam Talker

Posts: 1,004
Location: Manchester, UK
By using the code you gave in the first post. The code looks OK to me. Do you have an Images folder with blue_paper.gif in it?
gringo is offline
Reply With Quote
View Public Profile Visit gringo's homepage!
 
Old 02-19-2007, 09:43 AM Re: background problem
Novice Talker

Posts: 9
Name: Emile
yes, i have a folder with the gif-file in it and I have added the above mentioned code to the css file but it doesnt work. When I preview the pages, the color is white and not blue as it is supposed to be.

Fireworker
Fireworker is offline
Reply With Quote
View Public Profile
 
Old 02-19-2007, 09:56 AM Re: background problem
King Spam Talker

Posts: 1,004
Location: Manchester, UK
Have you linked the external css file correctly:
HTML Code:
<link rel="stylesheet" href="yourstyles.css" type="text/css" />
As a test, you could temporarily add:

HTML Code:
background-color: red;
to the body rule to see whether rules in the stylesheet are getting used. If the background does show up red then you know you have linked to the stylesheet correctly and there is either something wrong with the rule for the background-image, or a preceding rule.

Last edited by gringo : 02-19-2007 at 09:57 AM.
gringo is offline
Reply With Quote
View Public Profile Visit gringo's homepage!
 
Old 02-19-2007, 10:02 AM Re: background problem
Novice Talker

Posts: 9
Name: Emile
The color red appears. so that is okay. I validated the external style sheet on w3c and the code is okay.

have to check a bit further.

Fireworker
Fireworker is offline
Reply With Quote
View Public Profile
 
Old 02-19-2007, 11:00 AM Re: background problem
Novice Talker

Posts: 9
Name: Emile
okay, found it. This code does the trick:

Quote:
body {
padding:0 5%;
background: url(Images/blue_paper.gif);
background-repeat: repeat;
}
you see the difference with the first code? Dont ask me why this is so.

Anyway, ty gringo.

Fireworker
Fireworker is offline
Reply With Quote
View Public Profile
 
Old 02-19-2007, 11:15 AM Re: background problem
King Spam Talker

Posts: 1,004
Location: Manchester, UK
Glad you found a solution
gringo is offline
Reply With Quote
View Public Profile Visit gringo's homepage!
 
Reply     « Reply to background problem
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.18518 seconds with 12 queries