Table size

Discussing Html . Code , Software , other

Moderators: egami, macek, gesf

Post Reply
User avatar
frogrocker
New php-forum User
New php-forum User
Posts: 97
Joined: Mon Jul 07, 2003 10:30 pm
Location: Manchester

Fri Jun 10, 2005 6:19 am

Is there any way of making a table fill to the bottom of a page?

What I mean is, if a table doesn't contain much, so doesn't reach the bottom of a page, is there a way of making it stretch to fill the page, but when it already fills at least the page, it doesn't change?

Do you understand?

Thanks in advance.
"Don't look at the trombones - it only encourages them..."

willplatts@gmail.com

User avatar
Alexej Kubarev
Site Admin
Site Admin
Posts: 2213
Joined: Fri Mar 05, 2004 7:15 am
Location: Täby, Stockholms län
Contact:

Fri Jun 10, 2005 8:05 am

<table style="height:100%">
Best Regards,
Alexej Kubarev
-------------------------------
Zend Certified Engineer
Image Image

User avatar
frogrocker
New php-forum User
New php-forum User
Posts: 97
Joined: Mon Jul 07, 2003 10:30 pm
Location: Manchester

Fri Jun 10, 2005 10:48 am

No, sorry this doesn't work unless you use pixels, and then it may make it bigger than the page.

The problem is, the table is being used as a container for the rest of the page, and I want it to grow to fill the screen no matter how much text is in it.

Any other ideas?

Will.
"Don't look at the trombones - it only encourages them..."

willplatts@gmail.com

User avatar
Alexej Kubarev
Site Admin
Site Admin
Posts: 2213
Joined: Fri Mar 05, 2004 7:15 am
Location: Täby, Stockholms län
Contact:

Fri Jun 10, 2005 10:59 am

it works fine for me.. or maybe using that style="" tag in <td> or <tr>
Best Regards,
Alexej Kubarev
-------------------------------
Zend Certified Engineer
Image Image

User avatar
Alexej Kubarev
Site Admin
Site Admin
Posts: 2213
Joined: Fri Mar 05, 2004 7:15 am
Location: Täby, Stockholms län
Contact:

Fri Jun 10, 2005 11:21 am

i know what you mean, i had the same need before.. and its seems to work fine...
Best Regards,
Alexej Kubarev
-------------------------------
Zend Certified Engineer
Image Image

User avatar
ruturajv
php-forum Super User
php-forum Super User
Posts: 1279
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India
Contact:

Sun Jun 12, 2005 7:37 pm

Alexei Kubarev wrote:<table style="height:100%">

try this

Code: Select all

<table height="100%">

User avatar
Alexej Kubarev
Site Admin
Site Admin
Posts: 2213
Joined: Fri Mar 05, 2004 7:15 am
Location: Täby, Stockholms län
Contact:

Mon Jun 13, 2005 1:34 am

actually that is not to be used according to W3C.. and tidy doesnt like it either.. so i believe it should be avoided... it will work in some browsers.. but better to do it via style..
Best Regards,
Alexej Kubarev
-------------------------------
Zend Certified Engineer
Image Image

User avatar
Nullsig
php-forum Fan User
php-forum Fan User
Posts: 979
Joined: Thu Feb 17, 2011 6:52 am
Location: Racine, WI

Thu Apr 07, 2011 7:34 am

frogrocker wrote:No, sorry this doesn't work unless you use pixels, and then it may make it bigger than the page.

The problem is, the table is being used as a container for the rest of the page, and I want it to grow to fill the screen no matter how much text is in it.

Any other ideas?

Will.
If the table is being used as a container for the entirety of the page then when you add text to the table it will grow on its own without modifying the height. Just declare the table and fill it with content, it will expand to fill the page for as much as it needs.

azhagu
New php-forum User
New php-forum User
Posts: 13
Joined: Mon Jun 27, 2011 4:17 am

Tue Jun 28, 2011 3:37 am

Alexei Kubarev wrote:<table style="height:100%">
inside the style tag we use only the pixels..
refer this tutorials http://www.techpdf.in/html_pdf.php

stevemcgee
New php-forum User
New php-forum User
Posts: 20
Joined: Mon Feb 27, 2012 3:38 am

Wed Mar 28, 2012 9:32 pm

First check your hmtl of table like width,length or align. After proper value insert in html then solve your problem easily.

Hire PHP Developers - Experienced PHP Developers available on Full-Time, Part-Time & Hourly Basis.

User avatar
freshnet
php-forum Active User
php-forum Active User
Posts: 359
Joined: Tue Feb 22, 2011 8:19 am
Location: Canada

Thu Mar 29, 2012 6:18 am

Note that using height: 100% will make the height 100% of the container, NOT 100% of the page unless the page is the container. If you want your table to fill the page, put it inside a container div that is itself either set to height: 100% or a specific pixel value. Then height: 100% on the table should work.

Post Reply
  • Information
  • Who is online

    Users browsing this forum: Bing [Bot] and 2 guests