lostprophetpunk Posted August 9, 2010 Share Posted August 9, 2010 Hello there, I am having trouble with a background using css for one of my divs. I have tested the exact same code on a separate page and it works fine, however...when I import the exact same code into my other main page, it does everything else but show the background image needed for the css sprite links I am using. I have also checked and re-checked the source for the image and it is correct. The css is below... #starring { float:left; width: 940px; height:50px; } #starring a:hover {border:none;} #starring a { background:url(images/i-st-h1n1.png); height:50px; display:block; float:left; text-indent:-9999px; } #starring a.drew { background-position:0 0; width:94px; } #starring a:hover.drew { background-position: 0 -46px; } #starring a.calum { background-position: -95px 0; width:105px; } #starring a:hover.calum { background-position: -95px -46px; } #starring a.danny { background-position: -200px 0px; width: 80px; } #starring a:hover.danny { background-position: -200px -46px; } #starring a.ollie { background-position: -280px 0px; width: 95px; } #starring a:hover.ollie { background-position: -280px -46px; } #starring a.dan { background-position: -375px 0px; width: 90px; } #starring a:hover.dan { background-position: -375px -46px; } #starring a.jesse { background-position: -465px 0px; width: 95px; } #starring a:hover.jesse { background-position: -465px -46px; } #starring a.ash { background-position: -560px 0px; width: 110px; } #starring a:hover.ash { background-position: -560px -46px; } #starring a.sam { background-position: -670px 0px; width: 110px; } #starring a:hover.sam { background-position: -670px -46px; } #starring a.james { background-position: -780px 0px; width: 90px; } #starring a:hover.james { background-position: -780px -46px; } The html/php related is below... <?php echo "<div id=\"ftitle\"><img src=\"/drew/images/i-v-h1n1.png\" alt=\"\" /></div>\n"; echo "<div id=\"starring\">\n"; echo "<a href=\"#\" class=\"drew\" title=\"Drew Casson\">Drew Casson</a>\n"; echo "<a href=\"#\" class=\"calum\" title=\"Calum Radmore\">Calum Radmore</a>\n"; echo "<a href=\"#\" class=\"danny\" title=\"Danny Lee\">Danny Lee</a>\n"; echo "<a href=\"#\" class=\"ollie\" title=\"Ollie Richens\">Ollie Richens</a>\n"; echo "<a href=\"#\" class=\"dan\" title=\"Dan Richens\">Dan Richens</a>\n"; echo "<a href=\"#\" class=\"jesse\" title=\"Jesse Sanchez\">Jesse Sanchez</a>\n"; echo "<a href=\"#\" class=\"ash\" title=\"Ash Marshall\">Ash Marshall</a>\n"; echo "<a href=\"#\" class=\"sam\" title=\"Sam Marshall\">Sam Marshall</a>\n"; echo "<a href=\"#\" class=\"james\" title=\"James Tucker\">James Tucker</a>\n"; echo "</div>\n"; ?> No errors show, only the background image does not show. If anyone could help, thanks in advance. Quote Link to comment Share on other sites More sharing options...
JasonLewis Posted August 9, 2010 Share Posted August 9, 2010 Got a live link, would be much easier looking at it through firebug. Try a bit of debugging, like putting the background inside the div to see if it loads the background correctly. Quote Link to comment Share on other sites More sharing options...
lostprophetpunk Posted August 9, 2010 Author Share Posted August 9, 2010 I have already tried inline styling and it works, as well as just putting the image in the div as well...but for some reason it won't load from an external style sheet. Quote Link to comment Share on other sites More sharing options...
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.