Background-image is not displaying in Firefox
Strange thing happens. Background-image is not displaying in Firefox开发者_如何学C under some versions of WindowsXP and Windows Vista, but displays in Firefox under Mac OSX. It also displays in IE. This is CSS:
.cherry_banner {
background: url("library/media/images/cherry_banner_top.png") no-repeat;
width: 276px;
display:block;
min-height:100px;
padding-top: 13px;
color: #fdfdfd;
margin-bottom:20px;
}
.cherry_banner a {
color: #fdfdfd;
}
.cherry_banner a:hover {
text-decoration:underline;
}
.cherry_banner li {
list-style-type:none;
}
.cherry_banner h2 {
font-size: 18px;
margin-bottom: 10px;
}
.chb_text1 {
background: url("library/media/images/cherry_banner_pixel.png") repeat-y;
}
.chb_text2 {
background: url("library/media/images/cherry_banner_bottom.gif") bottom no-repeat;
padding: 4px 14px 24px 25px;
}
And this is html:
<div id="linkcat-8" class="cherry_banner tpt"><div class="chb_text1"><div class="chb_text2">
<h2>Для москвичей</h2>
<ul class='xoxo blogroll'>
<li><a href="http://inveda.ru/jyotish/naksatra-calendar/">Закажите бесплатный индивидуальный календарь благоприятных дат на 2010г.</a></li>
</ul>
</div></div></div>
You can see on http://www.inveda.ru - right column - red banner.
Your code is valid and yes, I can see the background correctly. (FF, IE6-9, Safari, Opera, Chrome)
I believe this is a browser caching problem (old CSS remaining on your XP machine). Make sure you hit Ctrl+F5 when you want to preview your page on different browser / PC.
Try to set also color to trasnsparent and remove quotes in url:
background: transparent url(library/media/images/cherry_banner_top.png) no-repeat;
精彩评论