ainca
01-30-2012, 06:39 PM
hi,
i am trying to make a website where the buttons should turn from white to blue on hover and when they are active to remain blue.
so here is my problem:
i did it and it works fine a s long as my hyperlink are defined as "#"
when i give the links the addresses, the buttons turn back to white when they are active.
here is the html, when it works :
<tr>
<td height="89" colspan="2"><div align="center"><img src="images/logo.jpg" width="235" height="89"></div></td>
<td><div id="container"><a href="#" class="btn">Picture Gallery</a></div></td>
<td><div id="container2"><a href="#" class="btn2">Customed Cards</a></div></td>
<td><div id="container3"><a href="#" class="btn3">Archive</a></div></td>
<td><div id="container4"><a href="#" class="btn4">Session Details</a></div></td>
<td><div id="container5"><a href="#" class="btn5">Contact</a></div></td>
<td> </td>
</tr>
and the css codes:
#container {
height:53px;
width:137px;
text-align:center;
margin:0,auto;
}
a.btn {
display: block;
background:url("../images/picture_gallery.jpg");
height:53px;
width:137px;
text-indent: -9999px;
}
a.btn:hover, a.btn:focus {
background:url("../images/picture_gallery_blue.jpg");
}
a.btn.active {
background:url("../images/picture_gallery_blue.jpg");
}
#container2 {
height:53px;
width:150px;
text-align:center;
margin:0,auto;
}
a.btn2 {
display: block;
background:url("../images/customed_cards.jpg");
height:53px;
width:150px;
text-indent: -9999px;
}
a.btn2:hover, a.btn2:focus {
background:url("../images/customed_cards_blue.jpg");
}
a.btn2.active {
background:url("../images/customed_cards_blue.jpg");
}
#container3 {
height:53px;
width:91px;
text-align:center;
margin:0,auto;
}
a.btn3 {
display: block;
background:url("../images/archive.jpg");
height:53px;
width:91px;
text-indent: -9999px;
}
a.btn3:hover, a.btn3:focus {
background:url("../images/archive_blue.jpg");
}
a.btn3.active {
background:url("../images/archive_blue.jpg");
}
#container4 {
height:53px;
width:151px;
text-align:center;
margin:0,auto;
}
a.btn4 {
display: block;
background:url("../images/session_details.jpg");
height:53px;
width:151px;
text-indent: -9999px;
}
a.btn4:hover, a.btn4:focus {
background:url("../images/session_details_blue.jpg");
}
a.btn4.active {
background:url("../images/session_details_blue.jpg");
}
#container5 {
height:53px;
width:102px;
text-align:center;
margin:0,auto;
}
a.btn5 {
display: block;
background:url("../images/contact.jpg");
height:53px;
width:102px;
text-indent: -9999px;
}
a.btn5:hover, a.btn5:focus {
background:url("../images/contact_blue.jpg");
}
a.btn5.active {
background:url("../images/contact_blue.jpg");
}
but when i give the hyperlinks the addresses it dose not work anymore:
<tr>
<td height="89" colspan="2"><div align="center"><img src="images/logo.jpg" width="235" height="89"></div></td>
<td><div id="container"><a href="Templates/picture_gallery.htm" class="btn">Picture Gallery</a></div></td>
<td><div id="container2"><a href="Templates/customed_cards.htm" class="btn2">Customed Cards</a></div></td>
<td><div id="container3"><a href="Templates/archive.htm" class="btn3">Archive</a></div></td>
<td><div id="container4"><a href="Templates/session_details.htm" class="btn4">Session Details</a></div></td>
<td><div id="container5"><a href="Templates/contact.htm" class="btn5">Contact</a></div></td>
<td> </td>
</tr>
can anyone tell me what did i do wrong and why that happened :confused:
any advice...
thanks in advance
here is the website i am working on http://kindersurf.com
i am trying to make a website where the buttons should turn from white to blue on hover and when they are active to remain blue.
so here is my problem:
i did it and it works fine a s long as my hyperlink are defined as "#"
when i give the links the addresses, the buttons turn back to white when they are active.
here is the html, when it works :
<tr>
<td height="89" colspan="2"><div align="center"><img src="images/logo.jpg" width="235" height="89"></div></td>
<td><div id="container"><a href="#" class="btn">Picture Gallery</a></div></td>
<td><div id="container2"><a href="#" class="btn2">Customed Cards</a></div></td>
<td><div id="container3"><a href="#" class="btn3">Archive</a></div></td>
<td><div id="container4"><a href="#" class="btn4">Session Details</a></div></td>
<td><div id="container5"><a href="#" class="btn5">Contact</a></div></td>
<td> </td>
</tr>
and the css codes:
#container {
height:53px;
width:137px;
text-align:center;
margin:0,auto;
}
a.btn {
display: block;
background:url("../images/picture_gallery.jpg");
height:53px;
width:137px;
text-indent: -9999px;
}
a.btn:hover, a.btn:focus {
background:url("../images/picture_gallery_blue.jpg");
}
a.btn.active {
background:url("../images/picture_gallery_blue.jpg");
}
#container2 {
height:53px;
width:150px;
text-align:center;
margin:0,auto;
}
a.btn2 {
display: block;
background:url("../images/customed_cards.jpg");
height:53px;
width:150px;
text-indent: -9999px;
}
a.btn2:hover, a.btn2:focus {
background:url("../images/customed_cards_blue.jpg");
}
a.btn2.active {
background:url("../images/customed_cards_blue.jpg");
}
#container3 {
height:53px;
width:91px;
text-align:center;
margin:0,auto;
}
a.btn3 {
display: block;
background:url("../images/archive.jpg");
height:53px;
width:91px;
text-indent: -9999px;
}
a.btn3:hover, a.btn3:focus {
background:url("../images/archive_blue.jpg");
}
a.btn3.active {
background:url("../images/archive_blue.jpg");
}
#container4 {
height:53px;
width:151px;
text-align:center;
margin:0,auto;
}
a.btn4 {
display: block;
background:url("../images/session_details.jpg");
height:53px;
width:151px;
text-indent: -9999px;
}
a.btn4:hover, a.btn4:focus {
background:url("../images/session_details_blue.jpg");
}
a.btn4.active {
background:url("../images/session_details_blue.jpg");
}
#container5 {
height:53px;
width:102px;
text-align:center;
margin:0,auto;
}
a.btn5 {
display: block;
background:url("../images/contact.jpg");
height:53px;
width:102px;
text-indent: -9999px;
}
a.btn5:hover, a.btn5:focus {
background:url("../images/contact_blue.jpg");
}
a.btn5.active {
background:url("../images/contact_blue.jpg");
}
but when i give the hyperlinks the addresses it dose not work anymore:
<tr>
<td height="89" colspan="2"><div align="center"><img src="images/logo.jpg" width="235" height="89"></div></td>
<td><div id="container"><a href="Templates/picture_gallery.htm" class="btn">Picture Gallery</a></div></td>
<td><div id="container2"><a href="Templates/customed_cards.htm" class="btn2">Customed Cards</a></div></td>
<td><div id="container3"><a href="Templates/archive.htm" class="btn3">Archive</a></div></td>
<td><div id="container4"><a href="Templates/session_details.htm" class="btn4">Session Details</a></div></td>
<td><div id="container5"><a href="Templates/contact.htm" class="btn5">Contact</a></div></td>
<td> </td>
</tr>
can anyone tell me what did i do wrong and why that happened :confused:
any advice...
thanks in advance
here is the website i am working on http://kindersurf.com