Board index   FAQ   Search  
Register  Login
Board index php forum :: HTML HTML Basics

Table size

Discussing Html . Code , Software , other

Moderators: macek, egami, gesf

Table size

Postby frogrocker » 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.
User avatar
frogrocker
New php-forum User
New php-forum User
 
Posts: 98
Joined: Mon Jul 07, 2003 10:30 pm
Location: Manchester

Postby Alexej Kubarev » Fri Jun 10, 2005 8:05 am

<table style="height:100%">
User avatar
Alexej Kubarev
Site Admin
Site Admin
 
Posts: 2223
Joined: Fri Mar 05, 2004 7:15 am
Location: Täby, Stockholms län

Postby frogrocker » 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.
User avatar
frogrocker
New php-forum User
New php-forum User
 
Posts: 98
Joined: Mon Jul 07, 2003 10:30 pm
Location: Manchester

Postby Alexej Kubarev » Fri Jun 10, 2005 10:59 am

it works fine for me.. or maybe using that style="" tag in <td> or <tr>
User avatar
Alexej Kubarev
Site Admin
Site Admin
 
Posts: 2223
Joined: Fri Mar 05, 2004 7:15 am
Location: Täby, Stockholms län

Postby Alexej Kubarev » Fri Jun 10, 2005 11:21 am

i know what you mean, i had the same need before.. and its seems to work fine...
User avatar
Alexej Kubarev
Site Admin
Site Admin
 
Posts: 2223
Joined: Fri Mar 05, 2004 7:15 am
Location: Täby, Stockholms län

Postby ruturajv » Sun Jun 12, 2005 7:37 pm

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

try this
Code: Select all
<table height="100%">
User avatar
ruturajv
php-forum Super User
php-forum Super User
 
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India

Postby Alexej Kubarev » 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..
User avatar
Alexej Kubarev
Site Admin
Site Admin
 
Posts: 2223
Joined: Fri Mar 05, 2004 7:15 am
Location: Täby, Stockholms län

Re: Table size

Postby kirthi » Tue Apr 05, 2011 10:58 pm

Hello

Use both ht and width as 100%

that is
<table border="1" height="100%" width="100%">
<tr>
<td>name</td>
<td>age</td>
</tr>
<tr>
<td>arun</td>
<td>45</td>
</tr>
<tr>
<td>raja</td>
<td>78</td>
</tr>
</table>
kirthi
New php-forum User
New php-forum User
 
Posts: 2
Joined: Tue Apr 05, 2011 10:53 pm

Re:

Postby Nullsig » 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.
User avatar
Nullsig
php-forum Fan User
php-forum Fan User
 
Posts: 981
Joined: Thu Feb 17, 2011 6:52 am
Location: Racine, WI

Re: Table size

Postby naseer89 » Fri Jun 10, 2011 10:20 pm

make table inside table.
<table width="100%" height="100%">
<tr>
<td>
<table>
<tr>
<td>Put your contents here.</td>
</tr>
</table>


</td>
</tr>
</table>
User avatar
naseer89
New php-forum User
New php-forum User
 
Posts: 2
Joined: Fri Jun 10, 2011 9:56 pm

Re:

Postby azhagu » 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
azhagu
New php-forum User
New php-forum User
 
Posts: 13
Joined: Mon Jun 27, 2011 4:17 am

Re: Table size

Postby stevemcgee » 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.
stevemcgee
New php-forum User
New php-forum User
 
Posts: 20
Joined: Mon Feb 27, 2012 3:38 am

Re: Table size

Postby freshnet » 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.
User avatar
freshnet
php-forum Active User
php-forum Active User
 
Posts: 275
Joined: Tue Feb 22, 2011 8:19 am
Location: Canada


Return to HTML Basics

Who is online

Users browsing this forum: Google [Bot] and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron