strange DOCTYPE problem..

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • maya

    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...
  • Andy Dingley

    #2
    Re: strange DOCTYPE problem..

    On 16 Mar, 13:40, maya <maya778...@yah oo.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

    Comment

    • Rik

      #3
      Re: strange DOCTYPE problem..

      maya <maya778899@yah oo.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

      Comment

      • maya

        #4
        Re: strange DOCTYPE problem..

        Rik wrote:
        maya <maya778899@yah oo.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..

        Comment

        • maya

          #5
          Re: strange DOCTYPE problem..

          Andy Dingley wrote:
          On 16 Mar, 13:40, maya <maya778...@yah oo.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..

          Comment

          • Rik

            #6
            Re: strange DOCTYPE problem..

            On Fri, 16 Mar 2007 21:00:19 +0100, maya <maya778899@yah oo.comwrote:
            Rik wrote:
            >maya <maya778899@yah oo.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

            Comment

            • Bergamot

              #7
              Re: strange DOCTYPE problem..

              maya wrote: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

              Comment

              • Andy Dingley

                #8
                Re: strange DOCTYPE problem..

                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 .

                Comment

                • Bergamot

                  #9
                  Re: strange DOCTYPE problem..

                  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

                  Comment

                  Working...