Problems after inserting full doctype

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

    Problems after inserting full doctype

    I am building several (common) db-driven intranet sites (so I cant
    post URL), using a 3-frame layout; header, menu & main pages. The
    styling and some of the positioning is done via CSS.

    Up until yesterday, I had incomplete Doctypes in my pages:

    <!doctype html public "-//w3c//dtd html 4.01 transitional//en">

    But now I have the full/correct doctype for 4.01 transitional:

    <!doctype html public "-//w3c//dtd html 4.01 transitional//en"
    "http://www.w3.org/tr/html4/loose.dtd">

    But since I made the changes, I am having a few problems...

    Example: Main entry page

    <div class="wrapper" >
    <div class="content" >
    <h2>Intro</h2>
    <p>Some text. Enough to word-wrap.</p>
    <p>Some more text. Enough to word-wrap.</p>
    <img id="MainPic" />
    </div>
    </div>


    The relevant formatting from the CSS is as follows:

    ..content {
    width:500px;
    }
    ..wrapper {
    text-align:center;
    }

    Body {
    etc;
    SCROLLBAR-BASE-COLOR: #f5f5dc;
    etc;
    }

    Given all this, I would expect the text on this page to be a 500px
    wide, left-justified block, which is centred within the frame. The img
    should also be centred within the frame. The scrollbars should be
    customised (in IE), with only the vertical scrollbar visible.

    Instead, the text is a little over the full width of the frame, and
    both scrollbars are visible, and are default shades. Other formatting
    such as background/font colours etc are all OK.

    This problem occurs on many pages, presumably for the same reasons...

    I wondered if the non-standard scrollbar styling was messing things
    uo, but the effect is the same with this removed...

    Help! I can easily go back to the half doctype declaration/quirks
    mode, but I'd rather understand this problem...

    Thanks in advance

    Chris
  • rf

    #2
    Re: Problems after inserting full doctype


    "CJM" <cjmwork@yahoo. co.uk> wrote in message
    news:c2d5ce61.0 306270351.9b1fc dd@posting.goog le.com...[color=blue]
    > I am building several (common) db-driven intranet sites (so I cant
    > post URL), using a 3-frame layout; header, menu & main pages. The
    > styling and some of the positioning is done via CSS.[/color]

    You are developing a new site using frames? What a pity.[color=blue]
    >
    > Up until yesterday, I had incomplete Doctypes in my pages:
    >
    > <!doctype html public "-//w3c//dtd html 4.01 transitional//en">[/color]

    Yep. This causes some browsers to function in quirks mode.
    [color=blue]
    > But now I have the full/correct doctype for 4.01 transitional:
    >
    > <!doctype html public "-//w3c//dtd html 4.01 transitional//en"
    > "http://www.w3.org/tr/html4/loose.dtd">[/color]

    Yep. We are now in standards compliant mode. The browser is suddenly not
    correcting your HTML nor working as per its old bugs.
    [color=blue]
    > But since I made the changes, I am having a few problems...[/color]

    As you would.

    Upload an example to a somewhere visible and provide the URL, not just
    snippits of code and somebody may be able to help you.

    Cheers
    Richard.


    Comment

    • Steve Pugh

      #3
      Re: Problems after inserting full doctype

      cjmwork@yahoo.c o.uk (CJM) wrote:
      [color=blue]
      >I am building several (common) db-driven intranet sites (so I cant
      >post URL),[/color]

      Create an example page and put that on any old piece of web space,
      there are so many things that you may think are irrelevant but which
      are needed to solve the puzzle.
      [color=blue]
      > using a 3-frame layout; header, menu & main pages. The
      >styling and some of the positioning is done via CSS.
      >
      >Up until yesterday, I had incomplete Doctypes in my pages:
      ><!doctype html public "-//w3c//dtd html 4.01 transitional//en">[/color]

      The doctype is wrong. The FPI portion of the deoctypes is case
      sensitive and should be -//W3C//DTD HTML 4.01 Transitional//EN
      [color=blue]
      >But now I have the full/correct doctype for 4.01 transitional:
      ><!doctype html public "-//w3c//dtd html 4.01 transitional//en"
      >"http://www.w3.org/tr/html4/loose.dtd">[/color]

      Again it's wrong for the same reason as above. However browsers (and
      one browser in particular) are bad at understanding doctypes so they
      probably count that as close enough to trigger Standards mode.
      [color=blue]
      >But since I made the changes, I am having a few problems...
      >
      >Example: Main entry page
      >
      ><div class="wrapper" >
      > <div class="content" >
      > <h2>Intro</h2>
      > <p>Some text. Enough to word-wrap.</p>
      > <p>Some more text. Enough to word-wrap.</p>
      > <img id="MainPic" />
      > </div>
      ></div>
      >
      >
      >The relevant formatting from the CSS is as follows:
      >
      >.content {
      > width:500px;
      >}
      >.wrapper {
      > text-align:center;
      >}
      >
      >Body {
      > etc;
      > SCROLLBAR-BASE-COLOR: #f5f5dc;
      > etc;
      >}
      >
      >Given all this, I would expect the text on this page to be a 500px
      >wide,[/color]

      Agreed. But remember that when moving from Quirks to Standard mode you
      move from the broken IE box model to the correct one. This means that
      the way that padding and borders interact with widths will change.
      [color=blue]
      >left-justified block,[/color]

      Nope. The text should be center justified, text-align is inherited.
      [color=blue]
      > which is centred within the frame.[/color]

      Nope. text-align should align inline content not blocks.
      [color=blue]
      >The img should also be centred within the frame.[/color]

      Nope. It should be centered within the div class="content" block.
      [color=blue]
      > The scrollbars should be customised (in IE),[/color]

      Bleagh. ;-)
      [color=blue]
      >with only the vertical scrollbar visible.[/color]

      That depends.
      [color=blue]
      >Instead, the text is a little over the full width of the frame,[/color]

      How wide is the frame?
      [color=blue]
      > and both scrollbars are visible,[/color]

      When a page that trggers Standards mode in IE6 is in a frame it either
      shows no scrollbars or both scrollbars.
      [color=blue]
      >and are default shades.[/color]

      Really? I thought that the coloured scrollbars weren't affected by
      Standards mode. Maybe because you're in a frame....

      What happens (widths, scrollbars, etc.) when you view the page outside
      of its frameset?

      A URI would really help.

      Steve

      --
      "My theories appal you, my heresies outrage you,
      I never answer letters and you don't like my tie." - The Doctor

      Steve Pugh <steve@pugh.net > <http://steve.pugh.net/>

      Comment

      • CJM

        #4
        Re: Problems after inserting full doctype

        Thanks Steve,

        I'll try and knock up a demo, and then repost.

        Chris

        Comment

        • CJM

          #5
          Re: Problems after inserting full doctype

          A quickie, Steve:

          If I have several DIVs on a page, how do I centre the DIV within the
          page, but with out centering the content of these divs?

          eg:

          <body or outer div>

          centered content

          <div id=1>
          Left-aligned content
          </div>

          <div id=2>
          Left-aligned content
          </div>

          more centered content

          </body or /div>

          This is one of the issues I have in my page, and it appears my
          solution is broken when standards mode is used.

          Thanks

          Comment

          • EightNineThree

            #6
            Re: Problems after inserting full doctype


            "CJM" <cjmwork@yahoo. co.uk> wrote in message
            news:c2d5ce61.0 306300057.1b8af 833@posting.goo gle.com...[color=blue]
            > Hmmmm... I was going to go off on one here... But instead, I'll give
            > you some background and an opportunity to solve the problem...
            >
            > First of all, I can also recite you a dozen 'frames are bad' articles.
            > And essentially I agree too.
            >
            > However, I am actually re-vamping an existing app hence the frames. At
            > a point in the not too distant future, I shall probably be moving to
            > an IFrame-based solution - a little better but not ideal.
            >
            > However, my hands are tied on this issue: my system will provide a
            > header and menu system, but non-technical users will create Docs of
            > various types (doc, xls, vsd) which maybe left in their original
            > format or may be converted to web pages (via ms office) or PDFs. Given
            > this requirement, what would you suggest? SHort of writing a very
            > complex & customised CMS, I am bound by these limitations.
            >
            > My solution is to show these documents in what ever format they are
            > given, in a frame (currently a frame, soon an iframe) with an option
            > to break out into a new window.
            >
            > Do you have a better solution?
            >
            > Note: Given the constraints I have specified, this is the solution the
            > NG came up with when I asked 6 months ago.
            >
            > Cheers
            >
            > "EightNineThree " <eightninethree @REMOVEeightnin ethree.com> wrote in[/color]
            message news:<bdiitc$8p p$1@ngspool-d02.news.aol.co m>...[color=blue][color=green]
            > > "CJM" <cjmwork@yahoo. co.uk> wrote in message
            > > news:c2d5ce61.0 306270351.9b1fc dd@posting.goog le.com...[color=darkred]
            > > > I am building several (common) db-driven intranet sites (so I cant
            > > > post URL), using a 3-frame layout;[/color]
            > >
            > > stop with the frames and start over
            > > http://www.theoryxdesign.com/articles/article.php?id=2[/color]
            > Hmmmm... I was going to go off on one here... But instead, I'll give
            > you some background and an opportunity to solve the problem...
            >
            > First of all, I can also recite you a dozen 'frames are bad' articles.
            > And essentially I agree too.
            >
            > However, I am actually re-vamping an existing app hence the frames. At
            > a point in the not too distant future, I shall probably be moving to
            > an IFrame-based solution - a little better but not ideal.
            >
            > However, my hands are tied on this issue: my system will provide a
            > header and menu system, but non-technical users will create Docs of
            > various types (doc, xls, vsd) which maybe left in their original
            > format or may be converted to web pages (via ms office) or PDFs. Given
            > this requirement, what would you suggest? SHort of writing a very
            > complex & customised CMS, I am bound by these limitations.
            >
            > My solution is to show these documents in what ever format they are
            > given, in a frame (currently a frame, soon an iframe) with an option
            > to break out into a new window.
            >
            > Do you have a better solution?
            >
            > Note: Given the constraints I have specified, this is the solution the
            > NG came up with when I asked 6 months ago.
            >
            > Cheers[/color]

            Everyone has an excuse about why their situation is so unique that they have
            to go against the advice they're given.
            No matter what excuse you come up with, I'll point out a major enterprise
            that has the same issue to deal with yet does not resort to frames.


            --
            Karl Core

            Charles Sweeney says my sig is fine as it is.








            Comment

            • Matthias Gutfeldt

              #7
              Re: Problems after inserting full doctype

              CJM wrote:[color=blue]
              > However, my hands are tied on this issue: my system will provide a
              > header and menu system, but non-technical users will create Docs of
              > various types (doc, xls, vsd) which maybe left in their original
              > format or may be converted to web pages (via ms office) or PDFs. Given
              > this requirement, what would you suggest? SHort of writing a very
              > complex & customised CMS, I am bound by these limitations.
              >
              > My solution is to show these documents in what ever format they are
              > given, in a frame (currently a frame, soon an iframe) with an option
              > to break out into a new window.[/color]

              There are indeed many situations where it doesn't make too much sense,
              or simply isn't possible, to convert Word / Excel / PDF or any other
              non-HTML document into useful HTML. In these cases we just offer a link
              to the document, ideally indicating the type and size of the file, so
              that users can do with it what they want (open in the browser, save to
              disc, open in the original application, whatever). I think that's more
              transparent for the user than when the browser attempts to open the file
              within a frameset. And some users aren't capable of saving or printing
              such a "browser-embedded" file because the usual application-specific
              menus are missing or incomplete.

              Other than that, I have no objections to frames in this context.


              Matthias

              Comment

              • Steve Pugh

                #8
                Re: Problems after inserting full doctype

                cjmwork@yahoo.c o.uk (CJM) wrote:
                [color=blue]
                >If I have several DIVs on a page, how do I centre the DIV within the
                >page, but with out centering the content of these divs?
                >
                >eg:
                >
                ><body>
                > centered content
                > <div id=1>[/color]

                id=1 is invalid HTML.
                See http://www.w3.org/TR/html401/types.html#type-name
                let's call them id="foo1" and id="foo2"
                [color=blue]
                > Left-aligned content
                > </div>
                > <div id=2>
                > Left-aligned content
                > </div>
                > more centered content
                ></body>[/color]

                body {text-align: center}

                #foo1, #foo2 {
                text-align: left;
                margin-left: auto;
                margin-right: auto;
                }

                Steve

                --
                "My theories appal you, my heresies outrage you,
                I never answer letters and you don't like my tie." - The Doctor

                Steve Pugh <steve@pugh.net > <http://steve.pugh.net/>

                Comment

                • CJM

                  #9
                  Re: Problems after inserting full doctype

                  If my situation is not so unique after all, why haven't you provided
                  any insight?

                  It takes a little skill to spot the problem, but a great deal more to
                  suggest a solution.

                  We are in agreement that frames are not ideal, but you know the
                  circumstances surrounding my problem, so suggest an alternative. What
                  would you recommend?
                  Which major enterprises do you suggest I look at?

                  I could point out that www.eightninethree.com uses tables for layout,
                  which strictly speaking goes against the grain for the web, but I
                  wouldnt be very helpful unless I provided further information to
                  enlighten you: eg.


                  In a year or two, all sites will be designed with standards that separate structure from presentation (or they will be built with Flash 7). We can watch our skills grow obsolete, or start learning …

                  http://www.alistapart.com/stories/journey/3.html <= This one is
                  quite good

                  etc...

                  My point is valid, but I'm deliberately looking for faults to prove a
                  point. Apart from the tables, your site looks pretty good IMHO.

                  If you can think of a better solution than my iframe one, then point
                  me in the right direction.

                  Cheers

                  CJM



                  "EightNineThree " <eightninethree @REMOVEeightnin ethree.com> wrote in message news:<bdp578$ms f$1@ngspool-d02.news.aol.co m>...[color=blue]
                  >
                  > Everyone has an excuse about why their situation is so unique that they have
                  > to go against the advice they're given.
                  > No matter what excuse you come up with, I'll point out a major enterprise
                  > that has the same issue to deal with yet does not resort to frames.[/color]

                  Comment

                  • cjm

                    #10
                    Re: Problems after inserting full doctype

                    > id=1 is invalid HTML.[color=blue]
                    > See http://www.w3.org/TR/html401/types.html#type-name
                    > let's call them id="foo1" and id="foo2"
                    >[/color]

                    Lol. Yes Steve, I know '1' is not a valid ID. And with one eye on XHTML, I
                    should really use quotes... but I was being expedient.
                    [color=blue]
                    > body {text-align: center}
                    >
                    > #foo1, #foo2 {
                    > text-align: left;
                    > margin-left: auto;
                    > margin-right: auto;
                    > }[/color]

                    I've never seen that before. I shall try it ASAP.

                    Thanks.

                    Chris


                    Comment

                    • EightNineThree

                      #11
                      Re: Problems after inserting full doctype


                      "CJM" <cjmwork@yahoo. co.uk> wrote in message
                      news:c2d5ce61.0 306300534.79a14 a@posting.googl e.com...[color=blue]
                      > If my situation is not so unique after all, why haven't you provided
                      > any insight?
                      >
                      > It takes a little skill to spot the problem, but a great deal more to
                      > suggest a solution.
                      >
                      > We are in agreement that frames are not ideal, but you know the
                      > circumstances surrounding my problem, so suggest an alternative. What
                      > would you recommend?
                      > Which major enterprises do you suggest I look at?
                      >
                      > I could point out that www.eightninethree.com uses tables for layout,
                      > which strictly speaking goes against the grain for the web, but I
                      > wouldnt be very helpful unless I provided further information to
                      > enlighten you: eg.[/color]

                      You could also point out that eightninethree. com is 23 pages of 100% valid
                      XHTML built dynamically with PHP and mySQL database(s)

                      And if you want to get into a pissing contest, there's baltimorepunk.c om -
                      16 pages of 100% valid XHTML STRICT with CSS layout built dynamically from
                      PHP and mySQL database(s). Also passes WCAG3 Accessibility guidelines with
                      exception to the lack of accesskeys/ tabindex

                      [color=blue]
                      > If you can think of a better solution than my iframe one, then point
                      > me in the right direction.
                      >[/color]

                      Well, as you've already pointed out, there's the truly correct CSS layout.
                      Honestly, because you've not shown a URL, there's not much more anyone can
                      offer here.
                      I can't tell you how many times someone has posted a bit of markup that they
                      thought was the offending portion, only to find out their true issue lay
                      elsewhere.

                      Generally speaking, I feel confident saying that frames and i-frames carry
                      with them enough inherent evils that they just oughtn't be used at all.


                      [color=blue]
                      > Cheers
                      >
                      > CJM
                      >
                      >
                      >
                      > "EightNineThree " <eightninethree @REMOVEeightnin ethree.com> wrote in[/color]
                      message news:<bdp578$ms f$1@ngspool-d02.news.aol.co m>...[color=blue][color=green]
                      > >
                      > > Everyone has an excuse about why their situation is so unique that they[/color][/color]
                      have[color=blue][color=green]
                      > > to go against the advice they're given.
                      > > No matter what excuse you come up with, I'll point out a major[/color][/color]
                      enterprise[color=blue][color=green]
                      > > that has the same issue to deal with yet does not resort to frames.[/color][/color]


                      Comment

                      • brucie

                        #12
                        Re: Problems after inserting full doctype

                        In post <bdqe74$rqr$1@n gspool-d02.news.aol.co m>
                        EightNineThree said...
                        [color=blue]
                        > baltimorepunk.c om - [...] passes WCAG3 Accessibility guidelines with
                        > exception to the lack of accesskeys/ tabindex[/color]

                        unless you allow visitors to define their own accesskeys for repeat
                        visits i believe accesskeys are a hindrance to accessibility.

                        if/when a standard exists for accesskeys that is universally adopted
                        /and/ supported by the user it may not be such an issue but you will
                        still have people or areas with their own preferred keys.

                        a nice idea but i don't think they're practical to implement unless
                        the visitor can define their own.

                        --
                        brucie a. blackford. 01/July/2003 08:46:39 am kilo.

                        Comment

                        • Nick Kew

                          #13
                          Re: Problems after inserting full doctype

                          In article <bdqe74$rqr$1@n gspool-d02.news.aol.co m>, one of infinite monkeys
                          at the keyboard of "EightNineThree " <eightninethree @REMOVEeightnin ethree.com> wrote:

                          (this kind of comment is a challenge ... so I pointed AccessValet at it)
                          [color=blue]
                          > And if you want to get into a pissing contest, there's baltimorepunk.c om -
                          > 16 pages of 100% valid XHTML STRICT with CSS layout built dynamically from
                          > PHP and mySQL database(s). Also passes WCAG3 Accessibility guidelines with
                          > exception to the lack of accesskeys/ tabindex[/color]

                          Very nearly true - congratulations .

                          But you have a gratuitous violation of WCAG 3.5 where you have a
                          paragraph marked up as <h1 class="ahem">.

                          As for accesskey/tabindex, that's a problematic guideline, because
                          informed opinion[1] holds that they are rarely a good thing in practice.

                          [1[ not just you, me and brucie, but a consensus of w3c-wai-ig.

                          --
                          Nick Kew

                          In urgent need of paying work - see http://www.webthing.com/~nick/cv.html

                          Comment

                          • Eric B. Bednarz

                            #14
                            Re: Problems after inserting full doctype

                            "EightNineThree " <eightninethree @REMOVEeightnin ethree.com> writes:
                            [color=blue]
                            > "Nick Kew" <nick@fenris.we bthing.com> wrote...[/color]
                            [color=blue][color=green]
                            >> But you have a gratuitous violation of WCAG 3.5 where you have a
                            >> paragraph marked up as <h1 class="ahem">.[/color]
                            >
                            > you're right. I'm not even sure why my pea brain decided an <h1> was
                            > appropriate there.[/color]

                            Actually, I'm quite sure why it did. There's that pubescent weblog
                            loccated at <http://webstandards.or g/> which used to suggest just that
                            (element type and class) in its now suspended BUC. As far as the
                            message itself is concerned, I'd recommend removing it completely,
                            because it sounds rather clueless in the 21st century (well, it always
                            sounded clueless in modern UAs that either did or did not implement
                            CSS).

                            --
                            <!DOCTYPO html>

                            Comment

                            Working...