Jump to content

CSS Background


lostprophetpunk

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/210201-css-background/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.