Automatically resize webpage.

  • Qsic
  • Beginner
  • Beginner
  • No Avatar
  • Joined: Mar 30, 2005
  • Posts: 35
  • Status: Offline

Post March 30th, 2005, 1:02 pm

Hey guys. How do I automatically resize my page to fit into a browser window? I know people hate it but it's important to me. Thanks..... Second question is how.... or better yet where in the code do insert java script?
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post March 30th, 2005, 1:02 pm

  • Axe
  • Genius
  • Genius
  • User avatar
  • Joined: Jan 07, 2004
  • Posts: 5755
  • Loc: Sub-level 28
  • Status: Offline

Post March 30th, 2005, 1:12 pm

Code: [ Download ] [ Select ]
<table width="100%">


JavaScript (depending on what the code does) is usually best in between the <head></head> tags.
John
» PHP Scripts & Resources » Free Photoshop Tutorials
» Anybody wanna pay my mortgage? PM me!

Post March 30th, 2005, 1:36 pm

Qsic: Are you asking about resizing the browser window, or the layout?
- dM

Post March 30th, 2005, 1:59 pm

Depending on if you want to have your webpage fill the height of the page you should include this attribute in your main table: style="height:100%;"

You could use height="100%" but I believe that's been depreciated.
  • Qsic
  • Beginner
  • Beginner
  • No Avatar
  • Joined: Mar 30, 2005
  • Posts: 35
  • Status: Offline

Post March 30th, 2005, 2:10 pm

or it could just resize the browser to fit the content either way. Browser to fit the content, or content to fit the browser.

Post March 30th, 2005, 2:12 pm

Qsic wrote:
or it could just resize the browser to fit the content either way. Browser to fit the content, or content to fit the browser.


People aren't going to resize their windows to fit your content :D .

Post March 30th, 2005, 2:12 pm

I would suggest having the layout size itself to the available area in the window. To do this, you would use percentage based layouts for TABLEs, DIVs or whatever your primary containing objects were.
- dM
  • Qsic
  • Beginner
  • Beginner
  • No Avatar
  • Joined: Mar 30, 2005
  • Posts: 35
  • Status: Offline

Post March 30th, 2005, 2:22 pm

I don't use tables. At all. It's one big image map. I hate tables. So how do I tell the browser to resize to 600x800 or how do I tell the image to resize itself to fit inside the browser window. Can someone tell me.... It doesnt' seem like that big of a question.

Post March 30th, 2005, 2:27 pm

I pulled this off of some site, I'm not that familiar with Javascript, but it'd be what you'd have to use.

Code: [ Download ] [ Select ]
<script language="JavaScript">
<!--
window.resizeTo(800,600)
-->
</script>
  1. <script language="JavaScript">
  2. <!--
  3. window.resizeTo(800,600)
  4. -->
  5. </script>


I'm sure you know this, but this will annoy users alot! Also if anyone has javascript turned off this effect won't happen.
  • Qsic
  • Beginner
  • Beginner
  • No Avatar
  • Joined: Mar 30, 2005
  • Posts: 35
  • Status: Offline

Post March 30th, 2005, 3:43 pm

that java script works, but now I want the webpage to resize to fit the browser. Yeah. THats what I want it to do.

Post March 30th, 2005, 4:29 pm

Then you'll need to use our table examples or CSS.

Post Information

  • Total Posts in this topic: 11 posts
  • Users browsing this forum: No registered users and 119 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© Unmelted Enterprises 1998-2009. Driven by phpBB © 2001-2009 phpBB Group.