Posted By

icecreamboyy on 02/23/11


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

e11world


Floating Ad Banner at Bottom of Screen


 / Published in: HTML
 

  1. <!-- Original Code: http://www.howtocreate.co.uk/fixedPosition.html -->
  2. <!-- Snippet With Example: http://code.dreamincode.net/snippet370.htm -->
  3.  
  4. <!-- CSS with support for IE -->
  5. <style type="text/css">
  6.  
  7. <!--
  8. #fixme {
  9. /* IE 5.0/Win and other lesser browsers will use this */
  10. position: absolute; right: 0px; bottom: 0px;
  11.  
  12. }
  13. body > div#fixme {
  14. /* used by Netscape6+/Mozilla, Opera 5+, Konqueror, Safari, OmniWeb 4.5+, ICEbrowser */
  15. position: fixed;
  16. }
  17. --></style>
  18. <!--[if gte IE 5.5]>
  19. <![if lt IE 7]>
  20. <style type="text/css">
  21. div#fixme {
  22. /* IE5.5+/Win - this is more specific than the IE 5.0 version */
  23. right: auto; bottom: auto;
  24. 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' );
  25. 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' );
  26. }
  27. </style>
  28. <![endif]>
  29. <![endif]-->
  30.  
  31. <!-- HTML CODE FOR ACTUAL BANNER -->
  32. <div id="fixme" style="height: 120px; width: 100%;">
  33. <!-- EDIT BANNER CONTENTS BELOW -->
  34. <div style="z-index: 5; background: url(http://home.dreamincode.net/images/catfish/catfish_tile2.gif); width: 100%; height: 120px;">
  35. <div style="float: left; position: relative; left: 0; top: 0;"><a href="http://forums.dreamincode.net/showtopic14671.htm"><img src="http://home.dreamincode.net/images/catfish/catfish2.gif" height="120" border="0"></a></div>
  36. <div style="float: right; position: relative; text-align: right; top: 75px; font-size: 10px; font-weight: bold;"><a onClick="hiderow('fixme');return true;" style="cursor: pointer;">Close Me</a></div>
  37. <div style="float: left; position: relative; top: 80px; text-align: center; font-size: 12px; font-weight: bold; font-style: italic;"><a href="http://forums.dreamincode.net/showtopic14671.htm">Celebrate 5 Years of Dream.In.Code:<br>Win a Laser Engraved IPod Nano & Caffeine!</a></div>
  38. </div>
  39. </div>

Report this snippet  

You need to login to post a comment.