View Single Post
Old 2010-08-06, 05:55 PM   #10
flowersgone
Are you sure you're an accredited and honored pornographer?
 
Join Date: Sep 2008
Posts: 67
Quote:
Originally Posted by LD View Post
Thanks! haven't had a chance to play around with yet, maybe this weekend.
I can see from a more careful look at your pages that LD did give it a try and am sorry to see that you had to give up. You now have <div id="menunav_id"> where you had <div id="menunav1"> and that should probably be switched back. When the fix works properly it looks like the image here: http://development.toosxxx4.com/imag..._after_fix.jpg.

Getting it to work cross browser was trickier than I thought though. At one point I had something that seemed to work for IE8 and FF3 and then got into some trouble adjusting it for Safari. I have now tested a revised version on IE7, IE8, FF3, Safari 5 and Chrome, including FF with JavaScript disabled. I must admit that there was a bit of tweaking for nearly every browser I tested. Anyway the html and css changes are as described above with <div class="menunav" id="menunav_id"> and height: auto for ".menunav". The new JavaScript code is not that lengthy, still replaces the same bit of code, and is included below. It is a bit complicated and the browsers were picky and I will understand if LD stays with something simpler for now.

The code assumes that menunav1 has been switched back in for the div tag. If anyone has any questions please send me a pm and I thank everyone for their patience.

Code:
<script type=text/javascript>
<!--
var h = document.getElementById('menunav1').clientHeight;
if (h > 100 && h < 1000) { // test for IE7 and chrome / safari
	var nav_n = document.getElementById('menunav_id');
	h = (h + 5) + 'px';
	if (nav_n.style.height==undefined)  // more safari
		nav_n.clientHeight = h;
	else
		nav_n.style.height = h;
}
var MenuBar2 = new Spry.Widget.MenuBar("MenuBar2", {imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
//-->
</script>
My apologies to LD for any time lost,
fg
__________________
Thank you for checking out my:
Portfolio and Tech Services

Last edited by flowersgone; 2010-08-06 at 06:05 PM..
flowersgone is offline   Reply With Quote