DelphiFAQ Home Search:

How to create a table that takes up the full screen


commentsThis article has not been rated yet. After reading, feel free to leave comments and rate it.


I want to display something centered on the screen and figured I use a table with one row and one column and set ALIGN=CENTER and VALIGN=CENTER. But how can I force the browser to full screen and adjust the table?


If your full screen window is popping up after a button or a link is clicked, then you can use javascript's as shown below.

If you need to resize an existing window, use the second piece of code. It will not hide the menu bar, status bar or other controls.

To make the table use the full window, simply put in WIDTH="100%" HEIGHT="100%" as shown at the bottom.

<script language="JavaScript" type="text/javascript">

// this opens a url in fullscreen mode
function fullscreen() {
var w ='','','fullscreen=yes');

// make an existing window full screen (for Internet Explorer)
var w = screen.width;
var h = screen.height;
resizeTo(w, h);
moveTo(0, 0);

// end hiding contents -->

<table WIDTH="100%" HEIGHT="100%"><tr>

Content-type: text/html


2007-06-26, 15:05:51
anonymous from United States  
if the flash swf's screen size is bigger, thn this method doesn't work . it overflows



NEW: Optional: Register   Login
Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option, or post under a registered account.

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity.
The owner of this web site reserves the right to delete such material.

photo Add a picture: