Jump to content

Div With Fixed Position Without Javascript(just Css)


nibble

Recommended Posts

hi friends i want to put a div with fixed position in pages(just with css codes)but as you know IE doesnt support-> posiotion:fixedso i use these code for IE but they dont work

div#fixme {  left: expression( document.body.scrollLeft + 'px' );  top: expression( document.body.scrollTop + 'px' );}

div#fixedd {position: absolute;top: 0px;left: 0px;_top: expression(( 0 + (fixpos = document.body.scrollTop)) + "px");}

now what can i do?thanks in advance

Link to comment
Share on other sites

hi friends i want to put a div with fixed position in pages(just with css codes)but as you know IE doesnt support-> posiotion:fixedso i use these code for IE but they dont work
div#fixme {  left: expression( document.body.scrollLeft + 'px' );  top: expression( document.body.scrollTop + 'px' );}

div#fixedd {position: absolute;top: 0px;left: 0px;_top: expression(( 0 + (fixpos = document.body.scrollTop)) + "px");}

now what can i do?thanks in advance

You don't need "div#fixme" as #fixme is unique and doesn't need an identifier (just to save some unnecessary keystrokes).You can get fixed in IE via a bug described here.You might want to avoid that "expression" stuff as it is only for IE.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...