Solved

Auto size web page to fit in browser

Posted on 2006-07-08
5
6,886 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

Question has a verified solution.

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

An enjoyable and seamless user experience can go a long way on an eCommerce site. While a cohesive layout and engaging copy play roles in creating a positive user experience, some sites neglect aspects that seem marginal but in actuality prove very …
This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

739 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