dph1077 Posted April 14, 2005 Posted April 14, 2005 I am not sure what I am doing wrong. I am experienced with making web pages so this is especially frustrating. I created a page in html, then re-wrote it in php. My problem is that the background image does not appear when I open the web page. It works fine when I test it on my desktop, but after uploading it, it doesn't show when I load the page. The image is in the same folder as the page. Here is a link to the page: http://www.areacode860.com/mary5/ I have tried leaving the background in the <body> tag and also putting it in the style sheet to no avail. Any help would be greatly appreciated. Thanks, Dave Quote
btrfld Posted April 14, 2005 Posted April 14, 2005 Hi Dave. Don't know of this helps, but I noticed you have 2 <head> sections and 2 <body> tags. Perhaps the second one is overriding the first? Quote
dph1077 Posted April 14, 2005 Author Posted April 14, 2005 Hi Dave.Don't know of this helps, but I noticed you have 2 <head> sections and 2 <body> tags. Perhaps the second one is overriding the first? <{POST_SNAPBACK}> I'm pretty good with html, new to php, so I'm not sure on this, but don't I need those tags? There are one set of opening and closing <head></head> and <body></body? tags. Does php not use them? From some of the stuff I've read on the net, it seems I can technically just change the extension of a page from .html to .php without a problem. Dave Quote
TCH-RobertM Posted April 14, 2005 Posted April 14, 2005 Hello dph, a pretty decent beginners tutorial for php is located Here should you need some guidance Quote
TweezerMan Posted April 14, 2005 Posted April 14, 2005 A web page is only supposed to have one set of <head>...,/head> and one set of <body>...</body> tags. Your page has 3 sets of <head>...</head> tags and 4 sets of <body>...</body> tags. Since these are HTML tags, php will not do anything with them other than output them to the browser. Your background is not displaying because your stylesheet is not linked correctly: ><link rel="stylesheet" type="text/css" href="/stylesheet.css"> With the slash in front of the stylesheet filename, the browser is looking for the stylesheet here: >http://www.areacode860.com/stylesheet.css ...but your stylesheet is actually here: >http://www.areacode860.com/mary5/stylesheet.css When the browser can find your stylesheet, the CSS you have in your stylesheet already will display the background: >body { background: url(bg_lilac.jpg);} Quote
dph1077 Posted April 14, 2005 Author Posted April 14, 2005 Thanks for all your help! I got it to work. Part of it was where the file was located, but it still didn't work. It also turns out that all of the html files that were being "included" in also each had a style tag in their <head> tags that I was using as I tested it on my desktop. Once the <style> tags were removed from each of the html files, it works great. Thanks once again!!! Dave Quote
TCH-Bruce Posted April 14, 2005 Posted April 14, 2005 It also turns out that all of the html files that were being "included" in also each had a style tag in their tags that I was using as I tested it on my desktop. Once the Dave, your includes should not contain a section either except the header. HTML should only have one set of tags in it. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.