fixed.js – Solution to IE6 “position:fixed” Bug

Posted 8 CommentsPosted in Web Development
IE6 has been a bane for all frontend developers for years. An element can be positioned relative to the browser window using the style position:fixed, it does not move when the page is scrolled. You can do nice layout things (e.g. facebook chat bar) with this in most modern browsers but not for IE6 in windows until you use fixed.js Sample Code for Facebook Type Chat Bar <html> <head> <style type="text/css"> body { margin:0px; padding:0px; height:1600px; position:relative; } #shoutbox { position:fixed; background-color:#F2F2F2; border-top:1px solid #CCCCCC; bottom:0px; left:0px; width:100%; height:25px; } </style> <script type="text/javascript" src="fixed.js"></script> </head> <body> <div id="shoutbox"> <!-- Our...