Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Strectching a page to fit screen 1

Status
Not open for further replies.

Terminus

IS-IT--Management
Jul 16, 2003
31
0
0
GB
Hi there not sure if this can be done using ASP, but i have a web page created in Fireworks MX and have converted it to a htm but i can see no way of making the page fit depending on the screen size. Is there any way this can be done using ASP or any other method?

Terminus
 
if you are useing tables, just sent the table width to 100%. It will fill the whole screen regardless of viewing size. But if the table has a lot of data, it may wrap the text making it look nasty, so I would to develop in an 800 x 600 screen size.

Hope that helps.
 
i actually just got through juggling this myself, but for auto scrolling DIV's i didn't want to exceed the visible screen :

<body onload="setTimeout('formattable()',50);">
<!-- the set timeout is there so the table ( when larger ) has a little bit of wiggle time so that it can be properly formatted -->
<script>
function formattable()
{
document.all.myTable.width = document.body.clientWidth-50;
document.all.myTable.height = document.body.clientHeight-50;
// the -50 is just to pad the edges of the screen a little
}
</script>

<table id="myTable">
<tr>
<td align="center" align="middle">blah</td>
</tr>
</table>
 
forgot to mention, this is based on the window size, regardless of the screen resolution
 
also you can add this script into the body for when the window is max'd or stretched:
<script>
if (document.all && window.print)
{
window.onresize = formattable;
}
</script>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top