100% Height???

ian27

It all started at 3......
Hey guys,

I'm trying to create a DW template that has a table set to 100% height. Of course I can do this in the property inspector and in my design view it looks fine, but when I preview it in my browser this parameter does not occur. I want it to be 100% height because I wanted to add the footer of the page right at the bottom even if there is only a small amount of content on a particular page. I have had this working once before using CSS but I've tried the same route and that didn't work either.

Any suggestions or a work through?

Thank you in advance.

Ian
 
Thanks for the response. Yep, the page is already set to HTML 4.01 Transitional.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

The height="100%" works fine in my design view, it's when I preview the page in my browser (Firefox and Safari) that it doesn't appear to work. Strange eh?
 
You need to remove the url from the DOCTYPE:

Change

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

to

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 
In other words, you might as well leave the doctype out. Removing the URL is the same thing...kicks your browser into Quirks mode.
 
or use css. tables are evil. and with CSS you can have a TRUE floating footer at the bottom of the WINDOW.
 
"tables are evil" only if you use 473 of them on one page just for the perfect positioning of all those blank spacer gif's. They require too much code for too little style. Using one single table to layout the basic building blocks of a site is not evil at all.
 
*consistent* support for CSS among browsers *cough cough MS IE cough*... is lacking. It's true enough, however, that your goal can be accomplished with CSS. While I wouldn't recommend leaving the DOCTYPE out, that too is a known hack for the 100% height gig.

I agree with "cat': Too many nested tables are problematic, however a simple construct is fine and provides a solid, consitent layout across browsers/platforms
 
Cat said:
"tables are evil" only if you use 473 of them on one page just for the perfect positioning of all those blank spacer gif's.

Table are evil for layout. Don't forget about semantics. Tables have a purpose... not for layout.
 
From the article I linked:

"Using pure CSS in all circumstances will have to wait until all browsers support CSS fully. If you've honestly tried to use CSS but encountered serious browser incompatibilities in the rough positioning of the content blocks, you should switch to minimal tables."

I completely subscribe to that.
 
I believe in CSS wherever possible. I don't believe in floating DIVs within DIVs to move a relatively positioned DIV outside the block of the absolutely positioned DIV which is fixed to the viewport, just to achieve an effect that four cells in a table can achieve.

I think it's all about balance. When I use tables, it's only ever in a situation where the table could survive happily if it had a border (that is, it's used for layout, but not assembly of slices).



A million nested DIVs are equally as stupid as a million nested tables.
 
ok. sorry. i forgot some people still use netscape 4 and IE 3. there is nothing that tables will allow you to do that can't be done with CSS.
 
Back
Top