Hi have created a catfish banner like the one at sitepoint for my site. I used slightly different code however, in order to get past the IE problem. However the "close" function is not working. I cannot work out why. Here is the code: <!-- Original Code: http://www.howtocreate.co.uk/fixedPosition.html --> <!-- Snippet With Example: http://code.dreamincode.net/snippet370.htm --> <!-- CSS with support for IE --> <!--[if gte IE 5.5]> <![if lt IE 7]> <style type="text/css"> div#fixme { /* IE5.5+/Win - this is more specific than the IE 5.0 version */ right: auto; bottom: auto; left: expression( ( -0 - fixme.offsetWidth + ( document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth ) + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' ); top: expression( ( +0 - fixme.offsetHeight + ( document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' ); } </style> <![endif]> <![endif]--> <!-- HTML CODE FOR ACTUAL BANNER --> </p> <div id="fixme" style="height: 79px; width: 100%;"> <!-- EDIT BANNER CONTENTS BELOW --> <div style="z-index: 5; background: url(assets/images/catfish-tile.gif); width: 100%; height: 79px; background-repeat: repeat-x"> <div style="float: left; position: relative; left: 0; top: 0;"><a href="../contactus.htm"> <style type="text/css"> <!-- #fixme { /* IE 5.0/Win and other lesser browsers will use this */ position: absolute; right: 0px; bottom: 0px; } body > div#fixme { /* used by Netscape6+/Mozilla, Opera 5+, Konqueror, Safari, OmniWeb 4.5+, ICEbrowser */ position: fixed; } --> </style> <img src="../assets/images/catfish.gif" width="292" height="79" border="0"></a></div> <div style="float: right; position: relative; text-align: right; top: 30px; font-size: 10px; font-weight: bold;"><a onClick="hiderow('fixme');return true;" style="cursor: pointer;">Close Me</a></div> <div style="float: left; position: relative; top: 30px; text-align: center; font-size: 12px; font-weight: bold; font-style: italic;"> <h1><a href="contactus.htm" class="style1 style1">Emigrating Expert Can Help you! CLICK HERE</a></h1> </div> </div> </div> HTML: The close function is the 6th row from the bottom. If anyone can work out why the close function is not working I would really appreciate it, because i can't work it out!! Thanks Notting
Where is the hiderow function defined? And the part directly after its call should return false. And you shouldn't have an anchor tag with no href....