By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,253 Members | 1,652 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,253 IT Pros & Developers. It's quick & easy.

Keeping Web Page at Fixed Width

P: n/a
Is there some kind of Javascript that will keep the web page at a
fixed width?

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

Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
SoloCDM <de******@aculink.net> writes:
Is there some kind of Javascript that will keep the web page at a
fixed width?


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 - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.