Solved

Auto size web page to fit in browser

Posted on 2006-07-08
5
6,862 Views
Last Modified: 2012-08-14
When a user adjust the browser size such as the width, the web pages' divisions, images, and other content become out of place. How can we adjust a web page to always fit in a browser without disturbing how the web page appears?
0
Comment
Question by:CABRLU63
5 Comments
 
LVL 2

Accepted Solution

by:
sixpack434 earned 150 total points
ID: 17066427
One way of doing this is to insert the contents in table and set the width of the table to 100%

directly underneath the body tag you would add <table width="100%>

For example if you wanted the header of the page to always adjust to the size of the page (let's say the header is a flash movie) the code would look like

<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="163" height="250">
      <param name="movie" value="flash/side.swf">
      <param name="quality" value="high">
      <embed src="flash/side.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="163" height="250"></embed>
    </object>
  </td>
</tr>
</table>
0
 
LVL 17

Expert Comment

by:jasonsbytes
ID: 17067101
Do you mean like this: http://www.postpoems.org

If so, use tables like the previous poster stated and use width="100%"
0
 
LVL 4

Expert Comment

by:John-Bayles
ID: 17071797
sixpack434 has got the right kind of idea, But its not only the table that needs to be specified into a percentage.  any part of your sight that has a dimension eg..Columns Rows Images Iframes etc..  all need to be specefied as a percentage. So when it loads it someones elses browser it loads as a percentage of there screen.
EXAMPLE:

<img src="PICTURE.jpg" width="50%" height="50%" />

this picture would load as 50% of your sceen size where if i load it it loads as 50% of my screen size.
0
 

Author Comment

by:CABRLU63
ID: 17095035
Thank you for your anwsers
How can the web page continue to fit in the browser when using divisions? Is there any javascript that would help out with this issue?

0
 
LVL 17

Expert Comment

by:jasonsbytes
ID: 17095084
What do you mean by divisions?
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
tomcat startup error 5 102
ebay devID, appID, certID, userToken 2 51
PHP Installer 5 37
Designing an online application with Ipad, smartphone app capability 2 25
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question