Before, the code block came from the button builder at grsites.com.  I was 
using it to build the graphics for custom buttons.  The code it generated can 
be improved it seems.  The new code uses an onClick event.

I thought the only reason the DIV was inside the A block was if a browser 
didn't understand CSS, the div inside a hyperlink <a> block would still work.  
This was weird.  If browser is smart enough to respond to mouse events, why 
can't an onClick event be used instead of <a>?

With trust, I used the automagically generated code from the site without 
thought.  Here is the re-written code with the same error; the divs are 
stacked vertically instead of in one line.

<!--MAIN NAVIGATION START-->
<div class="menu">

<!-- Home button div -->
<div id='button-home'
     style='height: 30; width: 150;
            background: url(images/button-home.jpg);
            background-position: 0px 0px; position: inline;'
     onmouseover 
= 'document.getElementById("button-home").style.backgroundPosition = "-150px 
0px"; '
     onmouseout 
=  'document.getElementById("button-home").style.backgroundPosition = "0px 
0px"; '
     onClick="parent.location='http://www.tropicwaveradio.net/'">
</div>
<!-- End button div -->
<!-- Instant replay button div -->
<div id='button-instant-replay'
     style='height: 30; width: 150;
            background: url(images/button-home.jpg);
            background-position: 0px 0px; position: inline;'
     onmouseover 
= 'document.getElementById("button-instant-replay").style.backgroundPosition 
= "-150px 0px"; '
     onmouseout 
=  'document.getElementById("button-instant-replay").style.backgroundPosition 
= "0px 0px"; '
     
onClick="parent.location='http://www.tropicwaveradio.net/listenlive.htm'">
</div>
<!-- End button div -->

</div>
<!-- End menu div -->

Thoughts anyone?  Please?

Thanks, Bob
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to