Connecting Tech Pros Worldwide Help | Site Map

Keeping Web Page at Fixed Width

SoloCDM
Guest
 
Posts: n/a
#1: Jul 20 '05
Is there some kind of Javascript that will keep the web page at a
fixed width?

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

Lasse Reichstein Nielsen
Guest
 
Posts: n/a
#2: Jul 20 '05

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 JavaScript / Ajax / DHTML bytes