Hopefully one day i'll be able to answer more questions that i post here!
Untill then though i was wondering if you can help. I recently read a comment on a web page quoting "internet explorer is ruining my life". Throw Safari into that mix and I'll sympathize with him!
Basically i've got a galleryish feature on a page to display client testimonials, which features a list of company names (as PNG files) on the left, and when you click them, the button changes colour and reveals a previously hidden div of text. I've achieved this by using the focus state...
Now I have the following script (suckerfish from htmldog.com) which helpt to get around internet explorers lack of support for the said focus state.....
<script type="text/javascript"><!--//--><![CDATA[//><!--
sfFocus = function() {
var sfEls = document.getElementsByTagName("A");
for (var i=0; i<sfEls.length; i++) {
sfEls[i].onfocus=function() {
this.className+=" sffocus";
}
sfEls[i].onblur=function() {
this.className=this.className.replace(new RegExp(" sffocus\\b"), "");
}
}
}
if (window.attachEvent) window.attachEvent("onload", sfFocus);
//--><!]]></script>
which is linked to the CSS in the following way....
.oyster{
position:absolute;
top: 4.5em;
left: 4.54em;
width: 17em;
height: 1.5em;
background: url("images/oystertest.png");
}
.oyster:hover {
background-position: bottom;
}
.oyster:focus {
outline:0;
}
.oyster span {
position: absolute;
top: -0.3em;
left: 29.5em;
width:42.1em;
visibility:hidden;
color: black;
text-decoration: none;
}
.oyster:focus span, a.sffocus{
position: absolute;
visibility: visible;
top:-0.3em;
left: 29.5em;
width:42.1em;
z-index: 2;
display:block;
}
and to the html as thus....
<div class="containertest">
<img class="quote" src="images/quote.png" alt="quote mark"/>
<span class="oyster" href="#oyster" >
<p>text</p>
<br />
<p class="b"><em>name</em> <br />
position<br />
company</span></p></a>
now this works PERFECT in firefox (doesn't everything), doesn't work at all in Safari 3.1.2, and goes ballistic in IE7 (instead of displaying the text when the oyster button is clicked, it tiles the oyster buttons graphic all over the page).
Anyone care to shed any light on this? Any help would be greatly appreciated!!!
