RSS Forums RSS
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 16129 | Replies: 5
Reply
Join Date: Jun 2004
Posts: 231
Reputation: cmills83 is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 0
cmills83 cmills83 is offline Offline
Posting Whiz in Training

Table = 100% in IE but not in FireFox?

  #1  
Jun 25th, 2005
<< URL Snip -- Please post code only, thanks >>

The table extends to the bottom in IE but not in FireFox, any ideas? Thanks!
AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2005
Posts: 232
Reputation: Dogtree is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 2
Dogtree's Avatar
Dogtree Dogtree is offline Offline
Posting Whiz in Training

Re: Table = 100% in IE but not in FireFox?

  #2  
Jun 25th, 2005
The height attribute doesn't exist in any portable HTML specification. You're relying on an IE extension. A workable solution is CSS:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<style type="text/css">
html,body {
  margin:0;
  padding:0;
  height:100%;
  width:100%;
}

table.full-height {
  height:100%;
  width:100%;
  border:1px solid black;
}
</style>
</head>
<body>
  <table class="full-height"><tbody><tr>
    <td>This is a test</td>
  </tr></tbody></table>
</body>
</html>
Reply With Quote  
Join Date: Jun 2004
Posts: 231
Reputation: cmills83 is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 0
cmills83 cmills83 is offline Offline
Posting Whiz in Training

Re: Table = 100% in IE but not in FireFox?

  #3  
Jun 26th, 2005
I'm afraid you are the man of the year. Thanks again for the help!
Reply With Quote  
Join Date: Jun 2007
Posts: 1
Reputation: Rumor is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Rumor Rumor is offline Offline
Newbie Poster

Re: Table = 100% in IE but not in FireFox?

  #4  
Jun 13th, 2007
Originally Posted by Dogtree View Post
The height attribute doesn't exist in any portable HTML specification. You're relying on an IE extension. A workable solution is CSS:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<style type="text/css">
html,body {
  margin:0;
  padding:0;
  height:100%;
  width:100%;
}
 
table.full-height {
  height:100%;
  width:100%;
  border:1px solid black;
}
</style>
</head>
<body>
  <table class="full-height"><tbody><tr>
    <td>This is a test</td>
  </tr></tbody></table>
</body>
</html>


Hi there,

I used to work this out by a tip I found on the web, similar to this:
I used to apply a class (fullHeight) to the html tag, but this is not valid code for XHTML.
So, while all other browsers parsed my page correctly, ie did not parse it properly when I had the class attribute there.
Then I did what you posted to bypass the invalid code, but again ie parse it wrong.
Is there any case that applying properties to the html object is invalid in any way?
Reply With Quote  
Join Date: Jul 2007
Posts: 1
Reputation: MichaelRoof is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
MichaelRoof MichaelRoof is offline Offline
Newbie Poster

Re: Table = 100% in IE but not in FireFox?

  #5  
Jul 26th, 2007
Just add the form tag to the previous posting. The reason it is not working could be because the a parent (form) object is not being expanded to 100%. <br>

Try This:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<style type="text/css">
html,body, form {
  margin:0;
  padding:0;
  height:100%;
  width:100%;
}

table.full-height {
  height:100%;
  width:100%;
  border:1px solid black;
}
</style>
</head>
<body>
  <table class="full-height"><tbody><tr>
    <td>This is a test</td>
  </tr></tbody></table>
</body>
</html>
Last edited by MichaelRoof : Jul 26th, 2007 at 2:20 pm.
Reply With Quote  
Join Date: Jan 2007
Posts: 2,640
Reputation: MidiMagic is on a distinguished road 
Rep Power: 7
Solved Threads: 118
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Posting Maven

Re: Table = 100% in IE but not in FireFox?

  #6  
Jul 28th, 2007
You are never going to have a screen-filling design for all users, for the simple reason that different computers are set up for different screen settings.

For example, my father still uses 800 X 600 because of his bad vision.
Daylight-saving time uses more gasoline
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 6:21 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC