I have a problem since I use a full DOCTYPE.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body style="height:100%">
<table cellspacing="0" cellpadding="0" border="1" style="width:100%;
height:100%;">
<tr style="height:50px">
<td valign="top">header</td>
</tr>
<tr style="height:100%;">
<td valign="top">body</td>
<tr>
<tr style="height:20px">
<td valign="top">footer</td>
</tr>
</table>
</body>
</html>
This works very well. The whole content fits in the browser window. When I
add the URL to the DOCTYPE:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
it doesn't work anymore with IE6. Since I have to use the latter DOCTYPE I
need a solution that leads to the same result as the first samle.
Can onyone help me with this.
--
bye Stephan...
Haven't looked into the 'fits in browserwindow' effect, but
the height on the tr won't work. tr doesn't have height, you
have to set height on the td instead.
--
Els
Mente humana é como pára-quedas; funciona melhor aberta.
Well, the three words "header", "body", "footer" should fit in virtually any
browser window, but what if there was more content than fits into 'body''s
100% high box?
> When I add the URL to the DOCTYPE (...) it doesn't work anymore with IE6.
Nor in any browser which implements the CSS1+2 box model (almost) correctly.
> Since I have to use the latter DOCTYPE
Why do you *have to* do that?
> I need a solution that leads to the same result as the first samle.
s/tr style="height:100%;"/tr/
--
Useless Fact #10:
Percentage of Americans who have visited Disneyland/Disney World: 70%.
From REC-CSS2:
'height'
(...)
Applies to: all elements but non-replaced inline elements,
table columns, and column groups
From HTML 4.01 Loose DTD (comments removed):
<!ATTLIST TR
%attrs;
%cellhalign;
%cellvalign;
bgcolor %Color; #IMPLIED
>
<!ATTLIST (TH|TD)
(...)
width %Length; #IMPLIED
height %Length; #IMPLIED
>
You are confusing something, I presume. In HTML4 Strict 'th' and 'td' don't
have 'height' and 'width' attributes either.
--
Reality is an illusion that occurs due to the lack of alcohol.
> *Els*:
>
>>the height on the tr won't work. tr doesn't have height,
>
> From REC-CSS2:
>
> 'height'
> (...)
> Applies to: all elements but non-replaced inline elements,
> table columns, and column groups
>
> From HTML 4.01 Loose DTD (comments removed):
>
> <!ATTLIST TR
> %attrs;
> %cellhalign;
> %cellvalign;
> bgcolor %Color; #IMPLIED
> >
> <!ATTLIST (TH|TD)
> (...)
> width %Length; #IMPLIED
> height %Length; #IMPLIED
> >
>
> You are confusing something, I presume. In HTML4 Strict 'th' and 'td' don't
> have 'height' and 'width' attributes either.
That's the html.
As Stephan is using <tr style="..">, I am just saying he
should set the height to the td instead. I'll be more exact
this time:
You can set the height to the td instead, as long as you use
css to do it, and not html. But even with css, it won't work
on tr, only on td.
>*Stephan Koser*:
>>
>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
>> <body style="height:100%">
>> <table border="1" style="height:100%;">
>> <tr style="height:50px">
>> <tr style="height:100%;">
>> <tr style="height:20px">
>>
>> This works very well. The whole content fits in the browser window.
>
>Well, the three words "header", "body", "footer" should fit in virtually any
>browser window, but what if there was more content than fits into 'body''s
>100% high box?
>
>> When I add the URL to the DOCTYPE (...) it doesn't work anymore with IE6.
>
>Nor in any browser which implements the CSS1+2 box model (almost) correctly.
>
>> Since I have to use the latter DOCTYPE
>
>Why do you *have to* do that?
>
>> I need a solution that leads to the same result as the first samle.
>
>s/tr style="height:100%;"/tr/
In case the OP doesn't happen to know traditional text editor command
syntax, this means to change the string "tr style="height:100%"" to
"tr".
--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.
In Germay we have legal restraints how a web page has to be implemented to
be barrier free. So the doctype should contain also the URL to the DTD.
--
bye Stephan...
I suppose you are referring to the BITV. Where does it say, that there
must be a system identifier in the document type declaration?
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
Well, perhaps I am wrong, but I interpreted condition 3.2 that way. Is says:
(sorry, but in original this is in german)
"Mittels Markup-Sprachen geschaffene Dokumente sind so zu erstellen und zu
deklarieren, dass sie gegen veröffentlichte formale Grammatiken validieren."
In (bad) english: documents created by markup languages have to be created
and decalred by validating against public grammars.
I thought this means that the DTD has to be included. Am I wrong (that would
be the easiest solution ;-))?
--
bye Stephan...
Define "works". :)
If you use IE quirks mode, as the OP originally did, IE does indeed set
the height of the TRs as specified.
--
--
~kaeli~
What's another word for thesaurus?
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
Sounds like 3.2 of the WAI guidelines (hardly surprising, most of the
national rules have copied the WAI guidelines with greater or lesser
numbers of changes).
http://www.w3.org/TR/WCAG10/wai-pageauth.html#tech-identify-grammar
"Create documents that validate to published formal grammars."
>I thought this means that the DTD has to be included. Am I wrong (that would
>be the easiest solution ;-))?
Yes, it means you need to include a doctype declaration, but if that
doctype is a well known, well established, publically published one
then there's no need to include the URL. Any HTML validator (or other
software that (a) is likely to parse your page and (b) needs to know
about the actual DTD in use) will know about the HTML 4.01 DTD without
needing to be explicitly pointed at it. If you were using a custom
DTD, or a recently published one then including the URL would be a
good move.
There's also the completely unrelated issue of doctype sniffing and
quirks vs standards mode. As you found out including the URL triggers
standards mode in IE6. If you want to comply with the spirit as well
as the letter of any accessibility regulations then writing your pages
in Strict rather than Transitional and triggering Standards rather the
Quirks mode would probably be a good move. I'm not saying that
Transitional pages are automatically less accessible, just that
writing Strict pages may help to put you as the author in the mindset
to produce accessible pages.
Steve
--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor
Steve Pugh <st...@pugh.net> <http://steve.pugh.net/>
Not using the full doctype sends IE into quirks mode.
Hence your problem when you add it. It actually complies! *LOL*
>
> This works very well. The whole content fits in the browser window.
If you want a header, content, and a footer to take up the whole window
even when there is not enough content to justify a whole window, use CSS
on divs, not tables (unless you need to support OLD browsers, then
you're stuck with the tables and might mudge by with changing the height
of the middle from 100% to 95%).
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<style type="text/css">
#header {
height: 20px;
width: 100%;
border: thin solid navy;
position: relative;
float: top;
}
#main {
width: 100%;
position: relative;
}
#footer {
height: 50px;
width: 100%;
border: thin solid navy;
position: absolute;
bottom: 20px;
}
</style>
</head>
<body>
<div id="header">this is header content</div>
<div id="main">this is main content</div>
<div id="footer">this is footer content</div>
</body>
</html>
> In article <4034a91c$0$41750$5fc...@dreader2.news.tiscali.nl>,
> els.a...@tiscali.nl enlightened us with...
>
>>You can set the height to the td instead, as long as you use
>>css to do it, and not html. But even with css, it won't work
>>on tr, only on td.
>
> Define "works". :)
>
> If you use IE quirks mode, as the OP originally did, IE does indeed set
> the height of the TRs as specified.
True, but he wanted to add the url to the doctype, and then
he'll have to style the TDs.
You seem to have a problem multiposting, too.
http://groups.google.com/groups?selm=c125nu%244om%241%40online.de
http://groups.google.com/groups?selm=c125n4%244kn%241%40online.de
--
Brian (follow directions in my address to email me)
http://www.tsmchughs.com/
> If you want a header, content, and a footer to take up the whole window
> even when there is not enough content to justify a whole window, use CSS
> on divs, not tables (unless you need to support OLD browsers, then
> you're stuck with the tables and might mudge by with changing the height
> of the middle from 100% to 95%).
Ok, actually we wanted to use tables. But DIVs would also be fine. Your
samle is ok, but when the main content si too large, it will flow over the
footer. That isn't nice.
We want to convert a page using frames to one without frames. I'm not quite
sure, if it is possible to get the same functionality. But what we want to
have is a fixed header on the very top and a fixed footer at the bottom of
the window. Between we want to have the content area, that is variable in
height. If the content is too large, we want to scroll only the 'main' area.
If this is not possible, it is ok, when we have to scroll the whole page.
But then the footer has to be at the end of the page. When the content is
not enough to fill the content area, the footer has to be at the bottom of
the window.
This should work in the most important Browsers (Netscape, Opera, Mozilla
and IE - also with little browser-specific modifications) and without
JavaScript.
I know this is very hard, but I hope there is a solution.
Thanks.
--
bye Stephan...
Oops.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<style type="text/css">
#header {
height: 20px;
width: 100%;
border: thin solid navy;
position: relative;
float: top;
}
#main {
width: 100%;
position: relative;
overflow: auto;
}
#footer {
height: 50px;
width: 100%;
border: thin solid navy;
float: bottom;
bottom: 20px;
}
</style>
</head>
<body>
<div id="header">this is header content</div>
<div id="main">this is main content<br>
this is main content<br>
this is main content<br>
this is main content<br>
this is main content<br>
this is main content<br>
this is main content<br>
this is main content<br>
this is main content<br>
this is main content<br>
this is main content<br>
this is main content<br>
this is main content<br>
this is main content<br>
this is main content<br>
this is main content<br>
this is main content<br>
this is main content<br>
this is main content<br>
this is main content<br>
this is main content<br>
this is main content<br>
this is main content<br>
this is main content<br>
this is main content<br>
this is main content<br>
this is main content<br>
this is main content<br>
this is main content<br>
this is main content<br>
</div>
<div id="footer">this is footer content</div>
</body>
</html>
--
--
~kaeli~
God was my co-pilot... but then we crashed in the mountains
and I had to eat him.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
For HTML (the OP uses HTML 4.01), a system identifier (URL) is _not_
necessary in a document type declaration. A formal public identifier
("-//W3C//...") is sufficient. For XHTML as an XML application, a system
identifier _is_ necessary.
(publically published :-)
Johannes Koch <ko...@w3development.de> wrote:
>
> For HTML (the OP uses HTML 4.01), a system identifier (URL) is _not_
> necessary in a document type declaration. A formal public identifier
> ("-//W3C//...") is sufficient. For XHTML as an XML application, a system
> identifier _is_ necessary.
I once asked in CIWAH if this was true or just a myth and Arjun Ray
assured me it was not true.
Which of the statements is not true?
The statement immediately preceding my response. I've found it (
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=cimpav8s4lmauk3ijrovcm3snkhokg5hqf%404ax.com
) now:
| My vague recollection is that XML DOCTYPE declarations require a
| system identifier to always be included?
As a matter of fact, no.
[28] doctypedecl ::= '<!DOCTYPE' S Name (S ExternalID)? S? ('['
intSubset ']' S?)? '>'
[75] ExternalID ::= 'SYSTEM' S SystemLiteral
| 'PUBLIC' S PubidLiteral S SystemLiteral
I would read this as: ExternalID must be either
* 'SYSTEM' white-space <system identifier>
or
* 'PUBLIC' white-space <formal public identifier> white-space <system
identifier>
So this requires at least a system identifier.
> > http://www.w3.org/TR/REC-xml#sec-prolog-dtd
>
> [28] doctypedecl ::= '<!DOCTYPE' S Name (S ExternalID)? S? ('['
> intSubset ']' S?)? '>'
>
> [75] ExternalID ::= 'SYSTEM' S SystemLiteral
> | 'PUBLIC' S PubidLiteral S SystemLiteral
>
> I would read this as: ExternalID must be either
> * 'SYSTEM' white-space <system identifier>
> or
> * 'PUBLIC' white-space <formal public identifier> white-space <system
> identifier>
>
> So this requires at least a system identifier.
Well yes, but ExternalID is optional in the definition of doctypedecl
- see <http://www.w3.org/TR/2004/REC-xml-20040204/#sec-notation>.
Oops, yes. I forgot that. But for validating XML against published
formal grammars, there must be an external or an internal subset.