[Javascript] Point me to the path, resize a div to fill window upon resize

Roger Roelofs rer at datacompusa.com
Wed Mar 12 20:14:13 CDT 2008


Chris,

Chris Hettinger wrote:
> An illustration of what I am looking for can be viewed by visiting 
> www.redfin.com <http://www.redfin.com/>. Complete a real estate search 
> in one of their markets; you will be taken to a results page that 
> fills the browser with a map, a summary box to the right and grid of 
> data below.
>
>  
>
> I need to recreate one aspect of what they are doing, that is on 
> window resize, I must grow/shrink the map div to fill the browser window.
>
Using the css width property in percent

#map {
  width: 100%;
}

will get the layout you want.  Although you will probably need to 
specify a minimum width, which is more challenging in css assuming you 
want to support ie6.  The other issue is that you will probably want to 
recompute the map, so you will need to attach a handler to the window's 
resize event

By the way, redfin is doing a poor job of browser sniffing and giving me 
a fixed width layout in firefox 3 because it says I'm using an 
'unsupported' browser.  and I should go download firefox :-).

-- 
Roger Roelofs
Datacomp Appraisal Services
3215 Eaglecrest, NE            E: rer at datacompusa.com
Grand Rapids, MI  49525        W: http://www.datacompusa.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20080312/23822fa9/attachment.htm>


More information about the Javascript mailing list