jmmathieu
07-29-2007, 09:16 AM
I set up a php header that included some style elements in it, and my page worked just fine. I had three icons that swapped out images when rolled over. However, I decided to move my style to a an external CSS and the first icon stopped displaying (the home icon, though the tooltip appears and there is a pixel or two i can click on still for the link). Everything else works just fine. Why would the same exact code work within a page, but not within an external CSS?
Here is the code:
<style type="text/css">
.btnContinueHome {
width: 60px;
height: 60px;
display: inline;
font-size: 10px;
text-decoration: none;
background-repeat:no-repeat;
background-image:url(img/homeicon1.png);
}
.btnContinueHome:hover {
background-image:url(img/homeicon2.png);
}
.btnContinueContact {
width: 60px;
height: 60px;
display: inline;
font-size: 10px;
text-decoration: none;
background-repeat:no-repeat;
background-image:url(img/contacticon1.png);
}
.btnContinueContact:hover {
background-image:url(img/contacticon2.png);
}
.btnContinueForum {
width: 60px;
height: 60px;
display: inline;
font-size: 10px;
text-decoration: none;
background-repeat:no-repeat;
background-image:url(img/forumicon1.png);
}
.btnContinueForum:hover {
background-image:url(img/forumicon2.png);
}
</style>
And here is how I called it using a stylesheet:
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<a class="btnContinueHome" TITLE="header=[Home] body=[]" href="http://XXXXXXX.com"> </a>
<a class="btnContinueContact" TITLE="header=[Contact] body=[]" href="mailto:XXX@XXXXXXX.com"> </a>
<a class="btnContinueForum" TITLE="header=[Forum] body=[]" href="http://XXXXXXX.com/forum"> </a>
Right now I have it working with the code in the page, but I'd like to use a stylesheet and it's really bothering me that I can't figure out why this won't work. Thanks in advance for any help.
Here is the code:
<style type="text/css">
.btnContinueHome {
width: 60px;
height: 60px;
display: inline;
font-size: 10px;
text-decoration: none;
background-repeat:no-repeat;
background-image:url(img/homeicon1.png);
}
.btnContinueHome:hover {
background-image:url(img/homeicon2.png);
}
.btnContinueContact {
width: 60px;
height: 60px;
display: inline;
font-size: 10px;
text-decoration: none;
background-repeat:no-repeat;
background-image:url(img/contacticon1.png);
}
.btnContinueContact:hover {
background-image:url(img/contacticon2.png);
}
.btnContinueForum {
width: 60px;
height: 60px;
display: inline;
font-size: 10px;
text-decoration: none;
background-repeat:no-repeat;
background-image:url(img/forumicon1.png);
}
.btnContinueForum:hover {
background-image:url(img/forumicon2.png);
}
</style>
And here is how I called it using a stylesheet:
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<a class="btnContinueHome" TITLE="header=[Home] body=[]" href="http://XXXXXXX.com"> </a>
<a class="btnContinueContact" TITLE="header=[Contact] body=[]" href="mailto:XXX@XXXXXXX.com"> </a>
<a class="btnContinueForum" TITLE="header=[Forum] body=[]" href="http://XXXXXXX.com/forum"> </a>
Right now I have it working with the code in the page, but I'd like to use a stylesheet and it's really bothering me that I can't figure out why this won't work. Thanks in advance for any help.