table hastle when I specify DocType (DTD)

P

Philip

Hello all.
I'm currently looking at website designs to try out for my next website.
I'm using a table that covers 100%X100%, putting a boarder around the limits
of the webpage.

All seems to go well, and it does validate, but when I put the DocType
statement in, its messes up the 100% for the hight.
easiest way to explain is to show you what I mean.
www.msmaustralia.com.au/test/index.html works spot on, but does not have a
DocType Declared
www.msmaustralia.com.au/test/index2.html is exactly the same, except with a
DocType Declared. this second one (that now verifies properly with the
DocType statement) will not fill the screen, and the 100% Heights don't
work!

I suppose most of the change is OK as it will fillout as the center cell
gets detail in it, but the little fader pictures on the left and right stay
small, and dont stretch.

Can someone please point me in the right direction as to why?

Or is this something strange with IE6? (have not tried another browser yet).

Thanks... Philip
 
E

Els

Philip said:
Hello all.
I'm currently looking at website designs to try out for my
next website. I'm using a table that covers 100%X100%,
putting a boarder around the limits of the webpage.

All seems to go well, and it does validate, but when I put
the DocType statement in, its messes up the 100% for the
hight. easiest way to explain is to show you what I mean.
www.msmaustralia.com.au/test/index.html works spot on, but
does not have a DocType Declared
www.msmaustralia.com.au/test/index2.html is exactly the
same, except with a DocType Declared. this second one
(that now verifies properly with the DocType statement)
will not fill the screen, and the 100% Heights don't work!

I suppose most of the change is OK as it will fillout as
the center cell gets detail in it, but the little fader
pictures on the left and right stay small, and dont
stretch.

Can someone please point me in the right direction as to
why?

Or is this something strange with IE6? (have not tried
another browser yet).

Other browsers might actually do without doctype what IE6 does
with a doctype. 100% height table will probably only work if
the body is 100% height too. Not sure, long time since I used
tables. Try it.
 
M

Mitja

Els said:
Other browsers might actually do without doctype what IE6
does with a doctype. 100% height table will probably only
work if the body is 100% height too. Not sure, long time
since I used tables. Try it.

Yup. When you don't pass the doctype to IE, it goes into "quirks mode",
trying to emulate its own bugs of past years. With a DT, it stops doing
that, and since height:100% is, in specs, not defined as 100% of the
viewport, it doesn't do what you'd expect. To get it to work, use
html, body, table#main {height: 100%}

hth
 
K

Karl Groves

Philip said:
Hello all.
I'm currently looking at website designs to try out for my next website.
I'm using a table that covers 100%X100%, putting a boarder around the limits
of the webpage.

All seems to go well, and it does validate, but when I put the DocType
statement in, its messes up the 100% for the hight.

Patient: "Doctor, it hurts when I do this"
Doctor: "So don't do that anymore"

"Filling The Visitor's Screen"
http://www.karlcore.com/articles/article.php?id=21
 
K

Karl Groves

Toby Inkster said:
While you're at it, 'id=' is a naughty attribute for a query string.
Google won't like you.

That's OK. I'm getting plenty of traffic from outside referrals.
If it wasn't a personal site, I'd go ahead and to the ole' mod_rewrite, but
I have too much other stuff going on for the time being.

-Karl
 
P

Philip

Patient: "Doctor, it hurts when I do this"
Doctor: "So don't do that anymore"

hehehehe. Good point.
Guess I'll just have to install all the other popular browsers to see how
they handle this.
 
P

Philip

Els said:
Other browsers might actually do without doctype what IE6 does
with a doctype. 100% height table will probably only work if
the body is 100% height too. Not sure, long time since I used
tables. Try it.
Thanks. I will try. Very new to html, so not quite sure what you mean, but
will look it up.
 
E

Els

Philip said:
Els said:
Philip wrote:
[100% table]
www.msmaustralia.com.au/test/index.html works spot
on, but does not have a DocType Declared
www.msmaustralia.com.au/test/index2.html is exactly the
same, except with a DocType Declared. this second one
(that now verifies properly with the DocType statement)
will not fill the screen, and the 100% Heights don't
work!

Other browsers might actually do without doctype what IE6
does with a doctype. 100% height table will probably only
work if the body is 100% height too. Not sure, long time
since I used tables. Try it.
Thanks. I will try. Very new to html, so not quite sure
what you mean, but will look it up.

The doctype will put IE in Standards mode, which means it'll
try better at getting it right. If you give the table a height
of 100%, it will be 100% of the body's height. But if the body
isn't 100% high, it won't help much for what you want.
 
Joined
May 13, 2008
Messages
1
Reaction score
0
Problem in contentpage with doctype

Hi,

I have been trying to get an answer to a similar problem but have not been successful so far. I am working on a contentpage and the masterpage has doctype declared. This is causing alignment problems in my table that has height set to 100%. I cannot use the style tag to set body height to 100% in my contentpage as it has no <head> tag. I tried editing the css file which the masterpage is calling, but no success. Any help is greatly appreciated

Thanks,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top