javascript - Is it possible to fix lower right corner of div to screen w.r.t scroll up/down -


i want make div vertically expand when scroll down , vertically contract when scroll such lower right corner approximately maintain same position on browser screen.

#resizable {  position:relative;  float:left;  width: 300px;  height: 200px;  padding: 0.7em; top:8px; left:2px;  word-wrap: break-word;} 

div need relative , adjustable align outer text wrap around it.

$(function() { $( "#resizable" ).resizable();}); 

http://jsfiddle.net/eyasq/1/

i able without fixed positioning using bit of javascript: http://jsfiddle.net/eyasq/5/

$(document).scroll(function() {    var top = $(document).scrolltop();    $("#resizable").css("margintop", top); }); 

the scroll event listener update top margin of #resizable div whenever page scrolled. div appear stay in place text reflow around it. effect little unusual, seems match requirements.


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -