Solved

Auto size web page to fit in browser

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

743 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

13 Experts available now in Live!

Get 1:1 Help Now