Forum Moderators: not2easy
#container {
width: 780px;
font-family: Arial;
font-size: 0.8em;
background: url(../images/bgimage.jpg) repeat-y 50% 10%;
border: 1px solid #e6930f;
}
html>body #container {background: url(images/bgimage.jpg) repeat-y 50% 10%;}
Can anyone see where I've gone wrong?
Thanks for your help,
Kath
You have two rules defining the background, the second one more specific and only supported by Firefox (not IE). The path to the image is not the same in both, with the first one pointing to ../images/ and the second to images/ .
It is not clear why you need the second rule. If you remove it, does the background show?
height: 100%; repeat-y 50% 10%;
[edited by: SilverLining at 3:13 pm (utc) on Aug. 15, 2006]
1. I tried to add a background colour in the CSS for the container div - it did nothing unfortunately
2.I added the 2nd declaration especially for Firefox as it did not work with just the 1st one. The correct path to the image is ../images/bgimage.jpg, but I was trying the other path in desperation!
3. I tried adding height: 100%; to the container div - this just made the bgimage longer in IE but it still didn't appear in Firefox.
I think I must be doing something really stupid! Any more ideas?
Thanks,
Kath
Yes I can open the background image directly in firefox by typing in it's url
I tried using 'top left' instead of the position in percentages like this:
#container {
width: 780px;
font-family: Arial;
font-size: 0.8em;
background: url(../images/bgimage.jpg) top left repeat-y;
border: 1px solid #e6930f
}
but sadly the image still didn't display in FF - it looked the same as before in IE
Also, you might try installing the following Firefox extensions to help you debug the problem:
Web Developer Toolbar
Firebug
Neither background or background-image is content (except to IE) so unless you specify a height attribute or provide content a standards compliant browser (such as FF or Opera) will only show the borders (in this instance) collapsed together.
/* ----------------- Main content ----------------------*/
#homepic {width:900px; height:164px; margin:5px 0 10px 0;background: url(images//Building 1 shortened.gif) no-repeat;}
#homepic a {color:#fff;}
#homepic:hover {background: url(images//Building 2 shortened.gif) no-repeat;}
.message{ position:absolute; width:360px; float:left; margin:30px 0px 0px 400px; color:#fff;} /*Link in picture*/
#bottomcontenttop{width:900px;height:10px;background: url(images//b_contenttop.jpg) no-repeat;}
#bottomcontent{width:898px; border-right:1px solid #c5c5c5;border-left:1px solid #c5c5c5;}
#bottomcontentbtm{width:900px;height:10px;background: url(images//b_contentbtm.jpg) no-repeat;}
#sidebar-left {float: right;width: 270px;margin: 0 6px 5px 0; padding:10px;}
#main {float: right;width: 270px;margin: 0 6px 5px 0; padding:10px;}
#sidebar-right {float: right;width: 270px;margin: 0 6px 5px 0; padding:10px;}
*/
.thumbs img{position:relative;padding:1px;margin:5px 8px 5px 9px;border:2px solid #F3962D;background:none;}
.thumbs img:hover{border:2px solid #c5c5c5; background:none;}
------------------------
Help me! I don't know what to do!
I don't believe it...in a last effort to trouble shoot on my own, I found the solution! I needed to specify the spaces in the file extension with some %signs and numbers. Damn the spaces and firefox/safari for not recognizing them as spaces!
The new functional code looks like this:
#homepic {width:900px; height:164px; margin:5px 0 10px 0;background: url(http://example.com/MRI/themes/template_008_ad_agency/ad_agency/images/Building%201%20shortened.jpg) no-repeat;}
#homepic a {color:#fff;}
#homepic:hover {background: url(http://example.com/MRI/themes/template_008_ad_agency/ad_agency/images/Building%202%20shortened.jpg) no-repeat;}
.message{ position:absolute; width:360px; float:left; margin:30px 0px 0px 400px; color:#fff;} /*Link in picture*/
#bottomcontenttop{width:900px;height:10px;background: url(images//b_contenttop.jpg) no-repeat;}
#bottomcontent{width:898px; border-right:1px solid #c5c5c5;border-left:1px solid #c5c5c5;}
#bottomcontentbtm{width:900px;height:10px;background: url(images//b_contentbtm.jpg) no-repeat;}
#sidebar-left {float: right;width: 270px;margin: 0 6px 5px 0; padding:10px;}
#main {float: right;width: 270px;margin: 0 6px 5px 0; padding:10px;}
#sidebar-right {float: right;width: 270px;margin: 0 6px 5px 0; padding:10px;}
*/
.thumbs img{position:relative;padding:1px;margin:5px 8px 5px 9px;border:2px solid #F3962D;background:none;}
.thumbs img:hover{border:2px solid #c5c5c5; background:none;}
I hope this helps someone out there that ran into the same problem!
Ciao!
[edited by: SuzyUK at 4:21 pm (utc) on July 7, 2008]
[edit reason] examplified URI's [/edit]