Javascript to allow screen res flexibility

by Chris Hawkins <netmaker2(at)yahoo.com>

 Date:  Thu, 14 Jun 2001 16:14:26 -0700
 To:  hwg-languages(at)hwg.org
  todo: View Thread, Original
HI all,

I need to get some input on coding for the client that will allow a screen 
resolution of 600 for 640 resolutions but expand and then FIX at 760 for 
800 and above resolutions.

Problem with per centages is they look awful for 1024, so we are trying to 
fix at 800 design, but   we also want to accomodate 640.  There is some 
awful psuedocode below (I'm definitely not a programmer).

Do you know of some code that will do this, and work for all browsers (4.0 
and above - or allow for checking and variation, at least)?

<table>
<tr>
<td> body of content of the table
<! -- at end of cell, sets table fix -->
  [If (document.window.size) >= 640 {
	<center><img src="spacer.gif" width=760 height=1 alt=""></center>
	}
	else  {
	<center><img src="spacer.gif" width=600 height=1 alt=""></center>
	} </td>
<!-- fixes width at a safe no-horiz scroll at 600 -->
</tr>
</table>

(And yeah, yeah, I know center tag is deprecated -- I use it as a trick to 
insure the spacer is only on one line  and uses less vertical space than a 
<BR> too, and center does work in all the browsers -- irrelevant to this 
resolution discussion)
===========
Chris Hawkins
Web Architect / UI and Design
http://netprofitnow.com/chrishawkins/
650-620-9524 h
===========
The idea is not to make art, but to be in that wonderful state which makes 
art inevitable.   	-- Robert Henri

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA