homepage Welcome to WebmasterWorld Guest from 54.196.197.153
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderator: open

CSS Forum

    
HELP: background image not showing up on IE7
BG Image not showing in IE7
icerock




msg:4137767
 3:35 pm on May 24, 2010 (gmt 0)

[size=2]<div style="margin:0 auto;margin-bottom:70px;margin-top:50px;height:44px;width:650px;background:url(images/navbar.jpg)no-repeat;clear:left">
<div style="margin-left:50px;float:left">
<h1 class="black">Products</h1>
</div>
<div style="margin-left:75px;float:left">
<p><a href="#pbx" class="navgreen">LINK 1</a></p>
</div>
<div style="margin-left:15px;float:left">
<p><a href="#voip-phones" class="navgreen">LINK 2</a></p>
</div>
<div style="margin-left:17px;float:left">
<p><a href="#voip-headsets" class="navgreen">LINK 3</a></p>
</div>
<div style="margin-left:30px;float:left">
<p><a href="#sip" class="navgreen">LINK 4</a></p>
</div>
</div>[/size]


Code above working on Firefox but on IE7 backbround image not showing up.
Originally this coded from CSS External Stylesheet and next thing I tried background-image:url(sample.jpg); inline-short-hand-code <-- still not working..

Any idea guys?

 

limbo




msg:4138248
 7:29 am on May 25, 2010 (gmt 0)

Have you tried validating your CSS? I can see one style that could be causing it:

background:url(images/navbar.jpg)no-repeat;

needs a space like:

background:url(images/navbar.jpg) no-repeat;
icerock




msg:4138342
 1:00 pm on May 25, 2010 (gmt 0)

Thank you limbo..
Actually I just resolve it yesterday. It's a hack actually for IE7 I just found while googling.
I just simply added a "#" in front of a selector.


#background:url(images/navbar.jpg)no-repeat;

Even without space at no-repeat works fine.

Thanks

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved