Connecting Tech Pros Worldwide Help | Site Map

Keeping Web Page at Fixed Width

  #1  
Old July 20th, 2005, 11:21 AM
SoloCDM
Guest
 
Posts: n/a
Is there some kind of Javascript that will keep the web page at a
fixed width?

************************************************** *******************
Signed,
SoloCDM

  #2  
Old July 20th, 2005, 11:21 AM
Lasse Reichstein Nielsen
Guest
 
Posts: n/a

re: Keeping Web Page at Fixed Width


SoloCDM <deedsmis@aculink.net> writes:
[color=blue]
> Is there some kind of Javascript that will keep the web page at a
> fixed width?[/color]

Yes. Don't do it, though. If a page tried crap like that on me,
it would be gone before it could say onbeforeunload!

But, if you insist, here are some examples of what not to do:

window.onresize = function(){
var root = document.documentElement||document.body;
resizeBy(800-root.offsetWidth,0);
}

(not all browsers have an onresize event, nor an offsetWidth, so
you must say which browser(s) you need the solution for)
Or:

setInterval(function(){
var root = document.documentElement||document.body;
resizeBy(800-root.offsetWidth,0);
},100);

/L
--
Lasse Reichstein Nielsen - lrn@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Keeping Web Page at Fixed Width SoloCDM answers 179 July 20th, 2005 05:06 PM