wolfpack
Jun 25th 2004, 9:52 am
Hello all--
First of all, a word of thanks for this site and this forum. DP offers great free tools and has attracted a great crowd to these fora -- knowledgeable, helpful and conciencious. Thank you all.
I have a sidebar with a dozen buttons for navigating around my site. The buttons are the same, with different text. Button style changes when the mouse is over it.
First take was 12 <img> tags, 24 pics w/onmouseover & onmouseout scripts. The code is a version of what Photoshop 6.0 generates. It appears to be pretty good compatibility-wize, but is bulky.
I'd like to do it in CSS. I'd like it to, as they say, "degrade" well in older browsers. Browser fonts are fine. Here's what I tried.
a.navbtn { ... background-image: url("pic1"); ... }
a.navbtn:hover { ... background-image: url("pic2"); ... }
...
<a href="about.html" class="navbtn">About Us</a>
In Netscape 4, the hover doesn't work, and that's ok. But what's not ok is, it's no longer a clickable link, it's just text.
If I put a div around the anchor and put the changing background pic there, NS7 and Opera 7 do the right thing, but in IE6 the div hover doesn't work.
So two questions.
1) Isn't there a well-known, by now canonical way to do this?
2) What's your favorite online resource for doing HTML/CSS that has good cross / backward compatibility?
First of all, a word of thanks for this site and this forum. DP offers great free tools and has attracted a great crowd to these fora -- knowledgeable, helpful and conciencious. Thank you all.
I have a sidebar with a dozen buttons for navigating around my site. The buttons are the same, with different text. Button style changes when the mouse is over it.
First take was 12 <img> tags, 24 pics w/onmouseover & onmouseout scripts. The code is a version of what Photoshop 6.0 generates. It appears to be pretty good compatibility-wize, but is bulky.
I'd like to do it in CSS. I'd like it to, as they say, "degrade" well in older browsers. Browser fonts are fine. Here's what I tried.
a.navbtn { ... background-image: url("pic1"); ... }
a.navbtn:hover { ... background-image: url("pic2"); ... }
...
<a href="about.html" class="navbtn">About Us</a>
In Netscape 4, the hover doesn't work, and that's ok. But what's not ok is, it's no longer a clickable link, it's just text.
If I put a div around the anchor and put the changing background pic there, NS7 and Opera 7 do the right thing, but in IE6 the div hover doesn't work.
So two questions.
1) Isn't there a well-known, by now canonical way to do this?
2) What's your favorite online resource for doing HTML/CSS that has good cross / backward compatibility?