Solved

Auto size web page to fit in browser

Posted on 2006-07-08
5
6,828 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
Problem to be resolved in this article Currently, development of website and web application can be done without writing thousands of lines of programming code by hand. Description This can be done through by using a open source framework such …
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The viewer will learn how to dynamically set the form action using jQuery.

920 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now