Crisp Posted December 29, 2010 Share Posted December 29, 2010 I'm currently messing around making a small website and I have used the HTML code to resize the users browser to fit the website; <body onload=" moveTo(300,50); resizeTo(440,640) Is there a code so that it disables the users Maximize button of the browser? As the website looks silly in full screen. I'm a bit of a novice when it comes to web design and as I said, it's just a mess around website going to be hosted from home. p.s. please don't come into this post and start shouting off on how stupid I am for doing this, as stated... IT'S JUST FOR FUN. Thanks in advance. Link to comment Share on other sites More sharing options...
0 Cupcakes Posted December 29, 2010 Share Posted December 29, 2010 Short Answer: No. Long Answer: If your site looks awkward with larger resolutions, don't worry about it. Link to comment Share on other sites More sharing options...
0 Ryoken Posted December 29, 2010 Share Posted December 29, 2010 Not gonna say your stupid or anything, but please, please don't do things like this. There are few things I hate more than a new window opening up, browser being resized ( and not able to resize ), and removing tool/menu bars.. If you want your website to be 440x640 ( or whatever ), then make a div, center it on the page, and work from there.. Leave it up to the user if they want their windows maximized or not.. Personally speaking, when I come to sites that do stuff like that, unless I HAVE to be there, I just leave.. I always have my windows maximized and it irks me when I site does stuff beyond it's little 'window' in the browser.. ( same thing with sites that open links/pages in new windows.. I can center click/right click if I want a new window/tab thanks, I don't need one forced upon me ) Link to comment Share on other sites More sharing options...
0 DrJohnSmitherson Posted December 29, 2010 Share Posted December 29, 2010 Can you link to the site? Link to comment Share on other sites More sharing options...
0 TonyLock Posted December 29, 2010 Share Posted December 29, 2010 This is why web development should be a licensed profession. Link to comment Share on other sites More sharing options...
0 CPressland Posted December 29, 2010 Share Posted December 29, 2010 If you want your website to be 440x640 ( or whatever ), then make a div, center it on the page, and work from there.. Leave it up to the user if they want their windows maximized or not.. +1 This is why web development should be a licensed profession. -1, gotta learn somewhere Cupcakes 1 Share Link to comment Share on other sites More sharing options...
0 Cupcakes Posted December 29, 2010 Share Posted December 29, 2010 This is why web development should be a licensed profession. Sigh. Maybe this is why people like you should give advice on how to better the situation rather than making senseless comments. Explain to him why forcing a browser resize isn't a good idea or what he can do instead. MikeChipshop and Fishfish0001 2 Share Link to comment Share on other sites More sharing options...
0 DrJohnSmitherson Posted December 29, 2010 Share Posted December 29, 2010 A quick google search gave me this on (release) { getURL ("javascript:window.open('http://www.yoursite.com','WindowName', 'width=800,height=600,top=0,left=0,toolbar=no,scro llbars=no,resizable=no,menubar=no,status=no,direct ories=no,location=no'); void(0);"); } http://board.flashkit.com/board/showthread.php?t=271987 http://www.google.com/#sclient=psy&hl=en&q=html+disable+maximize&aq=0v&aqi=g-v4g-o1&aql=&oq=&gs_rfai=&pbx=1&fp=e8de98ca5b405b41 Link to comment Share on other sites More sharing options...
0 Glen Posted December 29, 2010 Share Posted December 29, 2010 I don't believe there is a way to manipulate any of the basic window controls on the browser window. A better way to attack this problem would be a mix of HTML and CSS to create a fixed width DIV element for the main content of your page and center that DIV as has been suggested already. For example: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> <title>All my page content goes here</title> <style type="text/css"> body { text-align:center; } .pageContent { width: 640px; height: 440px; border:thin black dotted; text-align:left; margin-left:auto; margin-right:auto; } </style> </head> <body> <div class="pageContent"><p>All my page content goes here...</p></div> </body> </html> Hope this helps. Link to comment Share on other sites More sharing options...
0 Cupcakes Posted December 29, 2010 Share Posted December 29, 2010 The question really isn't how but rather that the aesthetics of the design look awkward with larger resolutions. Centering it within the browser isn't going to make a difference if it's already very small in width/height. It can be left (or right) aligned and it will still look awkward. Link to comment Share on other sites More sharing options...
0 Glen Posted December 29, 2010 Share Posted December 29, 2010 The question really isn't how but rather that the aesthetics of the design look awkward with larger resolutions. Centering it within the browser isn't going to make a difference if it's already very small in width/height. It can be left (or right) aligned and it will still look awkward. When it comes to aesthetics, the centered DIV approach for fixed width content is pretty much an accepted standard in many site designs. I tend to agree with you, however, that not using content that is scalable is a bad design decision, but that's really up to the designer to decide. Link to comment Share on other sites More sharing options...
0 sweetsam Posted December 29, 2010 Share Posted December 29, 2010 A license is not the solution to all problems. It only leads to more paper work. This is why web development should be a licensed profession. Link to comment Share on other sites More sharing options...
0 The_Decryptor Veteran Posted December 29, 2010 Veteran Share Posted December 29, 2010 A quick google search gave me this on (release) { getURL ("javascript:window.open('http://www.yoursite.com','WindowName', 'width=800,height=600,top=0,left=0,toolbar=no,scro llbars=no,resizable=no,menubar=no,status=no,direct ories=no,location=no'); void(0);"); } http://board.flashkit.com/board/showthread.php?t=271987 http://www.google.com/#sclient=psy&hl=en&q=html+disable+maximize&aq=0v&aqi=g-v4g-o1&aql=&oq=&gs_rfai=&pbx=1&fp=e8de98ca5b405b41 The only flags that apply (in Firefox at least) are width, height, top and left. Browsers have moved away from giving sites this level of control, for the simple reason is that it takes it away from the user. And I can't even get that code to work in IE. Link to comment Share on other sites More sharing options...
0 Crisp Posted December 29, 2010 Author Share Posted December 29, 2010 Thanks for the comments guys, I love the way some came in to just flame me even though I clearly stated in my original post that it was going to be a mess around website, I'm also trying to learn different HTML. Maybe you should have to become a licensed profession to post of Internet forums... :whistle: or maybe just learn to read. Thanks for the tips though, I've been trying all kinds of codes, but I may just centre my website and put it in a table with a nice border around it. Link to comment Share on other sites More sharing options...
0 greenwizard88 Posted December 29, 2010 Share Posted December 29, 2010 There's no way, afaik. What you can do is open a new window, disable resizing, set the size, and then the only way to change the size is to maximize it, which probably the user won't do. Link to comment Share on other sites More sharing options...
Question
Crisp
I'm currently messing around making a small website and I have used the HTML code to resize the users browser to fit the website;
<body onload=" moveTo(300,50); resizeTo(440,640)
Is there a code so that it disables the users Maximize button of the browser? As the website looks silly in full screen.
I'm a bit of a novice when it comes to web design and as I said, it's just a mess around website going to be hosted from home.
p.s. please don't come into this post and start shouting off on how stupid I am for doing this, as stated... IT'S JUST FOR FUN. Thanks in advance.
Link to comment
Share on other sites
14 answers to this question
Recommended Posts