Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

HTML question: nested table at 100% height via CSS

Thread Tools
 
Search this Thread
 
Old 01 November 2006, 06:27 PM
  #1  
spectrum48k
Scooby Regular
Thread Starter
 
spectrum48k's Avatar
 
Join Date: Feb 2006
Posts: 2,519
Likes: 0
Received 0 Likes on 0 Posts
Default HTML question: nested table at 100% height via CSS

I have a main table at 100% height and 100% width
It has two cells each 100% height

Inside the right cell I need another table, also 100% height

This renders ok in firefox, but IE doesn't render it correctly - the height isn't 100%, its just whatever the contents of the cells are.

Can someone tell me if its possible to have a nested table in IE, that is 100% height ?

Last edited by spectrum48k; 01 November 2006 at 06:40 PM.
Old 01 November 2006, 07:45 PM
  #2  
RichB
Scooby Regular
 
RichB's Avatar
 
Join Date: Apr 1999
Location: Bore Knee Muff
Posts: 3,666
Likes: 0
Received 0 Likes on 0 Posts
Default

Good luck!

HTML to CSS: Center the page vertically and horizontally (<table height="100%">)
Old 01 November 2006, 07:59 PM
  #3  
cottonfoo
Scooby Regular
 
cottonfoo's Avatar
 
Join Date: Jan 2001
Location: still behind twin turbos
Posts: 469
Likes: 0
Received 0 Likes on 0 Posts
Default

There's no height attribute for HTML tables, so use CSS as above.
Old 01 November 2006, 08:21 PM
  #4  
judgejules
Scooby Regular
 
judgejules's Avatar
 
Join Date: Nov 2000
Posts: 1,227
Likes: 0
Received 0 Likes on 0 Posts
Default

I think this is what you want? This works fine in FF, IE6 & IE7. The border is on so you can see it.

Jules

Code:
<html>
 <head>
  <title>test</title>
 </head>
 <body>
  <table style="WIDTH: 100%; BORDER: black 1px solid; HEIGHT: 100%">
   <tr>
    <td style="WIDTH: 50%; VERTICAL-ALIGN: top;">a</td>
    <td style="WIDTH: 50%"><table style="BORDER: black 1px solid; WIDTH: 100%; HEIGHT: 100%;">
      <tr>
       <td style="VERTICAL-ALIGN: top;">b</td>
      </tr>
     </table>
    </td>
   </tr>
  </table>
 </body>
</html>
Old 01 November 2006, 08:37 PM
  #5  
spectrum48k
Scooby Regular
Thread Starter
 
spectrum48k's Avatar
 
Join Date: Feb 2006
Posts: 2,519
Likes: 0
Received 0 Likes on 0 Posts
Default

Originally Posted by cottonfoo
There's no height attribute for HTML tables, so use CSS as above.
Yeah I know, I AM using CSS and have no problem getting both IE and FIREFOX to render a table at 100% height.

The problem I'm having is rendering a table of 100% height, inside a table thats 100% height (using CSS)

I've approached the problem a different way now, so the above solution is no longer needed.

I would be curious if it can be done tho'
Old 01 November 2006, 09:49 PM
  #6  
spectrum48k
Scooby Regular
Thread Starter
 
spectrum48k's Avatar
 
Join Date: Feb 2006
Posts: 2,519
Likes: 0
Received 0 Likes on 0 Posts
Default

Thanks judgejules
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
shorty87
Full Cars Breaking For Spares
19
22 December 2015 11:59 AM
alcazar
Non Scooby Related
37
27 September 2015 10:35 PM
speedrick
Subaru Parts
0
26 September 2015 03:01 PM
shorty87
Other Marques
0
25 September 2015 08:52 PM
shorty87
Wheels And Tyres For Sale
0
25 September 2015 08:36 PM



Quick Reply: HTML question: nested table at 100% height via CSS



All times are GMT +1. The time now is 06:08 PM.