[jQuery] Position div accounting for screen size/resize

2010-01-06 Thread kevinkace
Can you change a position of a div, based on screen size/resize with jquery? Something like if (browser= sitecontainerwidth) { left:50%; margin-left: 20px; } else { left: 0%; margin-left: 600px; } I have a centered layout (div{margin: top auto;}) with a BG image. There's another div (with a

Re: [jQuery] Position div accounting for screen size/resize

2010-01-06 Thread brian
Bind a handler for the resize event like so: $(window).bind('resize', function() { ...}); Have a look at this thread: http://groups.google.com/group/jquery-en/browse_thread/thread/4a00d513c63f5c00?pli=1 On Wed, Jan 6, 2010 at 11:08 AM, kevinkace kevinacame...@gmail.com wrote: Can you change a