User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the HTML and CSS section within the Web Development category of DaniWeb, a massive community of 422,560 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,634 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our HTML and CSS advertiser: Lunarpages Web Hosting

Table = 100% in IE but not in FireFox?

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  
All times are GMT -4. The time now is 1:25 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC