By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,988 Members | 1,476 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,988 IT Pros & Developers. It's quick & easy.

strange DOCTYPE problem..

P: n/a
this is doctype I was told to use for a site I'm building at work..

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

only problem is, in IE the layout gets totally screwed up!
everything becomes centered, the divs containing nav buttons gets
compressed, and buttons show up one on top of the other (it's a
horizontal nav, buttons run across top of pages..)

in FF no problem at all..

site is done with css, pretty standard css code, nothing out of the
ordinary (I think....;)

can't provide url, site is still in development..

would appreciate some suggestions.. thank you...
Mar 16 '07 #1
Share this Question
Share on Google+
8 Replies


P: n/a
On 16 Mar, 13:40, maya <maya778...@yahoo.comwrote:
this is doctype I was told to use for a site I'm building at work..

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
Probably the wrong doctype to use. You should always use HTML 4.01
Strict, unless there's a good reason not to. There aren't many good
reasons.

This particular doctype declaration _should_ make CSS rendering behave
itself
See <http://hsivonen.iki.fi/doctype/>
but it's impossible to say for sure without a URL.
only problem is, in IE the layout gets totally screwed up!
Smells like a quirks mode rendering problem.
everything becomes centered, the divs containing nav buttons gets
compressed, and buttons show up one on top of the other (it's a
horizontal nav, buttons run across top of pages..)
That just sounds like broken code.
site is done with css, pretty standard css code, nothing out of the
ordinary (I think....;)
Have you validated both HTML and CSS ? (Let me guess!)
Have you validated both HTML and CSS _before_ asking any question to
c.i.w.a.*?

can't provide url
Can't provide a solution

Mar 16 '07 #2

P: n/a
Rik
maya <ma********@yahoo.comwrote:
can't provide url, site is still in development..
Yes you can, just post a link to a quick static HTML document which
illustrates the behaviour. We won't mind the site isn't finished, the
content isn't there etc.

--
Rik Wasmus
Mar 16 '07 #3

P: n/a
Rik wrote:
maya <ma********@yahoo.comwrote:
>can't provide url, site is still in development..

Yes you can, just post a link to a quick static HTML document which
illustrates the behaviour. We won't mind the site isn't finished, the
content isn't there etc.

--Rik Wasmus
ok,here's url: http://www.mayacove.com/misc/page.html

(css validates..)

thank you..

Mar 16 '07 #4

P: n/a
Andy Dingley wrote:
On 16 Mar, 13:40, maya <maya778...@yahoo.comwrote:
>this is doctype I was told to use for a site I'm building at work..

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

Probably the wrong doctype to use. You should always use HTML 4.01
Strict, unless there's a good reason not to. There aren't many good
reasons.

This particular doctype declaration _should_ make CSS rendering behave
itself
See <http://hsivonen.iki.fi/doctype/>
but it's impossible to say for sure without a URL.
>only problem is, in IE the layout gets totally screwed up!

Smells like a quirks mode rendering problem.
>everything becomes centered, the divs containing nav buttons gets
compressed, and buttons show up one on top of the other (it's a
horizontal nav, buttons run across top of pages..)

That just sounds like broken code.
>site is done with css, pretty standard css code, nothing out of the
ordinary (I think....;)

Have you validated both HTML and CSS ? (Let me guess!)
Have you validated both HTML and CSS _before_ asking any question to
c.i.w.a.*?

>can't provide url

Can't provide a solution
interesting.. I put this,

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

which I got from here, http://htmlhelp.com/tools/validator/doctype.html
(the top one..)

and problem goes away..

still don't fully get this doctype thing, but well, if this one works
will leave this one I guess..

thank you very much..

Mar 16 '07 #5

P: n/a
Rik
On Fri, 16 Mar 2007 21:00:19 +0100, maya <ma********@yahoo.comwrote:
Rik wrote:
>maya <ma********@yahoo.comwrote:
>>can't provide url, site is still in development..
Yes you can, just post a link to a quick static HTML document which
illustrates the behaviour. We won't mind the site isn't finished, the
content isn't there etc.
--Rik Wasmus

ok,here's url: http://www.mayacove.com/misc/page.html

(css validates..)
Could you also validate & fix the HTML errors?
--
Rik Wasmus
Mar 16 '07 #6

P: n/a
maya wrote:
>
http://www.mayacove.com/misc/page.html
Mixing HTML style attributes with CSS is asking for trouble. Get rid of
all those align attributes, for starters. Then validate the HTML and go
from there.

--
Berg
Mar 17 '07 #7

P: n/a
On 17 Mar, 16:26, Bergamot <berga...@visi.comwrote:
Mixing HTML style attributes with CSS is asking for trouble.
I think you mean "HTML 3.2 presentational attributes". Mixing these
with CSS is indeed asking for trouble.

Adding CSS through a HTML 4 style attribute is much more
straightforward.

Mar 19 '07 #8

P: n/a
Andy Dingley wrote:
On 17 Mar, 16:26, Bergamot <berga...@visi.comwrote:
>Mixing HTML style attributes with CSS is asking for trouble.

I think you mean "HTML 3.2 presentational attributes".
Yes, that is indeed what I meant. I forget that "style" is an attribute,
probably because I rarely use it. It can make for messy code, too.

--
Berg
Mar 19 '07 #9

This discussion thread is closed

Replies have been disabled for this discussion.