467,171 Members | 1,261 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,171 developers. It's quick & easy.

strange DOCTYPE problem..

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
  • viewed: 2718
Share:
8 Replies
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
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
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
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
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
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
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
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.

Similar topics

9 posts views Thread by Stephen Melia | last post: by
6 posts views Thread by Patrick | last post: by
12 posts views Thread by Robert Misiorowski | last post: by
1 post views Thread by Mike the Canadian | last post: by
7 posts views Thread by M O J O | last post: by
reply views Thread by the friendly display name | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.