$(document).ready(function(){ $(window).resize(function(){ $('#pagewrap').width($(window).width()); }); });
The margin and padding of the body needs to be set to 0 for this to work properly. Note that as soon as you start adding borders to #pagewrap you're going to get problems. Also not sure how this looks in anything other than IE7. Also note that different browsers handle the resize functionality different - IE7 will fire it as you resize, FF2 only on finished the resize (I think), so be carefull. On Feb 1, 9:48 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hello :) > > Thanks for the multitude of helpful threads you people post! > > Before trying something gorgeous with jQuery, I thought I should try > something basic - like setting the width of my #pagewrap div to the > inner width of the user's window. I can't do it right! > > Please will you show me how to do it? And, if you're feeling generous, > how to make it resize if the user resizes their viewport? > > Cheers - > Cherry.