Attaching a background image with CSS

liunx

Guest
I'm pretty new to the HTML/CSS/JavaScript thing, and I'm trying to get a home page off the ground. I'm having trouble attaching a background image to a window in my site. The layout I'm going for is frames surrounding the main window, with a navigation bar on the left frame. I want to use a style sheet to attach fixed images to the upper and lower left hand corners of the main window to round them out. My site is "http://mywebpages.comcast.net/perseus1029/index.html" if my description is unclear. <br />
<br />
So far, I can't get an image to appear at all on the background. I've tried:<br />
<br />
background-image:url(../images/ulcorner.jpg);<br />
background-image:url("../images/ulcorner.jpg");<br />
background-image:url("http:/mywebpages.comcast.net/perseus1029/images/ulcorner.jpg");<br />
<br />
Nothing seems to work. I know the page is pointing to the style sheet because I get text formatting no problem. Comcast sent me a url to try, but that isn't working either. If anyone can help, I would really appreciate it. Also, any design feedback is always a plus. THanks!<!--content-->Is this on the frameset page or on the page inside of the frames? Stylesheets won't work all that well for the frameset page. But anyway, have you tried<br />
background:url(images/ulcorner.jpg);<br />
Peace,<br />
:D Ed<!--content-->You need to remove the "../". The code you have is telling the browser that the images is at "http://mywebpages.comcast.net/images/ulcorner.JPG", which it isn't. It is at "http://mywebpages.comcast.net/perseus1029/images/ulcorner.JPG".<br />
So try this:<br />
<br />
background-image: url("images/ulcorner.JPG");<br />
<br />
That should take care of it.<br />
<br />
Make sure you do the same thing to your style link in the main frame. You should have:<br />
<br />
<link href=http://www.htmlforums.com/archive/index.php/"pdmobius.css" rel="stylesheet" type="text/css"><!--content-->Hmm...<br />
Tried changing the path as per your recommendation. It doesn't recognize url(/images/ulcorner.jpg) or<br />
url(images/ulcorner.jpg)<br />
I tried changing the location of the JPG to the root, and the CSS accordingly, but that's not working either. I'm beginning to believe in a vengeful god. :)<!--content-->You need to quote the url:<br />
<br />
background-image: url("images/ulcorner.JPG");<br />
<br />
I'm not sure if you need to worry about case sensitivity, but it is worth a shot. Try capitalizing the .JPG like I have done. I know for a fact that the locations I gave you are correct, so it is coming down to things like syntax.<!--content-->YES!<br />
That did it. Thanks for the help. I've been trying to get that to work for a week and a half. LOL.<!--content-->
 
Back
Top