Fitting complete browserwindow

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

    Fitting complete browserwindow

    Hi,

    I have a problem since I use a full DOCTYPE.

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    </head>
    <body style="height:1 00%">
    <table cellspacing="0" cellpadding="0" border="1" style="width:10 0%;
    height:100%;">
    <tr style="height:5 0px">
    <td valign="top">he ader</td>
    </tr>
    <tr style="height:1 00%;">
    <td valign="top">bo dy</td>
    <tr>
    <tr style="height:2 0px">
    <td valign="top">fo oter</td>
    </tr>
    </table>
    </body>
    </html>

    This works very well. The whole content fits in the browser window. When I
    add the URL to the DOCTYPE:

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

    it doesn't work anymore with IE6. Since I have to use the latter DOCTYPE I
    need a solution that leads to the same result as the first samle.
    Can onyone help me with this.

    --
    bye Stephan...



  • Els

    #2
    Re: Fitting complete browserwindow


    Stephan Koser wrote:
    [color=blue]
    > Hi,
    >
    > I have a problem since I use a full DOCTYPE.
    >
    > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    > <html>
    > <head>
    > </head>
    > <body style="height:1 00%">
    > <table cellspacing="0" cellpadding="0" border="1" style="width:10 0%;
    > height:100%;">
    > <tr style="height:5 0px">
    > <td valign="top">he ader</td>
    > </tr>
    > <tr style="height:1 00%;">
    > <td valign="top">bo dy</td>
    > <tr>
    > <tr style="height:2 0px">
    > <td valign="top">fo oter</td>
    > </tr>
    > </table>
    > </body>
    > </html>
    >
    > This works very well. The whole content fits in the browser window. When I
    > add the URL to the DOCTYPE:
    >
    > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    > "http://www.w3.org/TR/html4/loose.dtd">
    >
    > it doesn't work anymore with IE6. Since I have to use the latter DOCTYPE I
    > need a solution that leads to the same result as the first samle.
    > Can onyone help me with this.[/color]

    Haven't looked into the 'fits in browserwindow' effect, but
    the height on the tr won't work. tr doesn't have height, you
    have to set height on the td instead.


    --
    Els

    Mente humana é como pára-quedas; funciona melhor aberta.

    Comment

    • Christoph Paeper

      #3
      Re: Fitting complete browserwindow

      *Stephan Koser*:[color=blue]
      >
      > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
      > <body style="height:1 00%">
      > <table border="1" style="height:1 00%;">
      > <tr style="height:5 0px">
      > <tr style="height:1 00%;">
      > <tr style="height:2 0px">
      >
      > This works very well. The whole content fits in the browser window.[/color]

      Well, the three words "header", "body", "footer" should fit in virtually any
      browser window, but what if there was more content than fits into 'body''s
      100% high box?
      [color=blue]
      > When I add the URL to the DOCTYPE (...) it doesn't work anymore with IE6.[/color]

      Nor in any browser which implements the CSS1+2 box model (almost) correctly.
      [color=blue]
      > Since I have to use the latter DOCTYPE[/color]

      Why do you *have to* do that?
      [color=blue]
      > I need a solution that leads to the same result as the first samle.[/color]

      s/tr style="height:1 00%;"/tr/

      --
      Useless Fact #10:
      Percentage of Americans who have visited Disneyland/Disney World: 70%.

      Comment

      • Christoph Paeper

        #4
        Re: Fitting complete browserwindow

        *Els*:[color=blue]
        >
        > the height on the tr won't work. tr doesn't have height,[/color]

        From REC-CSS2:

        'height'
        (...)
        Applies to: all elements but non-replaced inline elements,
        table columns, and column groups

        From HTML 4.01 Loose DTD (comments removed):

        <!ATTLIST TR
        %attrs;
        %cellhalign;
        %cellvalign;
        bgcolor %Color; #IMPLIED[color=blue]
        >[/color]
        <!ATTLIST (TH|TD)
        (...)
        width %Length; #IMPLIED
        height %Length; #IMPLIED[color=blue]
        >[/color]

        You are confusing something, I presume. In HTML4 Strict 'th' and 'td' don't
        have 'height' and 'width' attributes either.

        --
        Reality is an illusion that occurs due to the lack of alcohol.

        Comment

        • Els

          #5
          Re: Fitting complete browserwindow

          Christoph Paeper wrote:
          [color=blue]
          > *Els*:
          >[color=green]
          >>the height on the tr won't work. tr doesn't have height,[/color]
          >
          > From REC-CSS2:
          >
          > 'height'
          > (...)
          > Applies to: all elements but non-replaced inline elements,
          > table columns, and column groups
          >
          > From HTML 4.01 Loose DTD (comments removed):
          >
          > <!ATTLIST TR
          > %attrs;
          > %cellhalign;
          > %cellvalign;
          > bgcolor %Color; #IMPLIED[color=green]
          > >[/color]
          > <!ATTLIST (TH|TD)
          > (...)
          > width %Length; #IMPLIED
          > height %Length; #IMPLIED[color=green]
          > >[/color]
          >
          > You are confusing something, I presume. In HTML4 Strict 'th' and 'td' don't
          > have 'height' and 'width' attributes either.[/color]

          That's the html.
          As Stephan is using <tr style="..">, I am just saying he
          should set the height to the td instead. I'll be more exact
          this time:
          You can set the height to the td instead, as long as you use
          css to do it, and not html. But even with css, it won't work
          on tr, only on td.

          --
          Els

          Mente humana é como pára-quedas; funciona melhor aberta.

          Comment

          • Harlan Messinger

            #6
            Re: Fitting complete browserwindow

            Christoph Paeper <christoph.paep er@nurfuerspam. de> wrote:
            [color=blue]
            >*Stephan Koser*:[color=green]
            >>
            >> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
            >> <body style="height:1 00%">
            >> <table border="1" style="height:1 00%;">
            >> <tr style="height:5 0px">
            >> <tr style="height:1 00%;">
            >> <tr style="height:2 0px">
            >>
            >> This works very well. The whole content fits in the browser window.[/color]
            >
            >Well, the three words "header", "body", "footer" should fit in virtually any
            >browser window, but what if there was more content than fits into 'body''s
            >100% high box?
            >[color=green]
            >> When I add the URL to the DOCTYPE (...) it doesn't work anymore with IE6.[/color]
            >
            >Nor in any browser which implements the CSS1+2 box model (almost) correctly.
            >[color=green]
            >> Since I have to use the latter DOCTYPE[/color]
            >
            >Why do you *have to* do that?
            >[color=green]
            >> I need a solution that leads to the same result as the first samle.[/color]
            >
            >s/tr style="height:1 00%;"/tr/[/color]

            In case the OP doesn't happen to know traditional text editor command
            syntax, this means to change the string "tr style="height:1 00%"" to
            "tr".

            --
            Harlan Messinger
            Remove the first dot from my e-mail address.
            Veuillez ôter le premier point de mon adresse de courriel.

            Comment

            • Stephan Koser

              #7
              Re: Fitting complete browserwindow


              "Christoph Paeper" <christoph.paep er@nurfuerspam. de> schrieb im Newsbeitrag
              news:c126rs$1iv u$1@ariadne.rz. tu-clausthal.de...[color=blue]
              > *Stephan Koser*:[color=green]
              > >
              > > Since I have to use the latter DOCTYPE[/color]
              >
              > Why do you *have to* do that?[/color]

              In Germay we have legal restraints how a web page has to be implemented to
              be barrier free. So the doctype should contain also the URL to the DTD.

              --
              bye Stephan...


              Comment

              • Johannes Koch

                #8
                Re: Fitting complete browserwindow

                Stephan Koser wrote:[color=blue]
                > "Christoph Paeper" <christoph.paep er@nurfuerspam. de> schrieb im Newsbeitrag
                > news:c126rs$1iv u$1@ariadne.rz. tu-clausthal.de...
                >[color=green]
                >>*Stephan Koser*:
                >>[color=darkred]
                >>>Since I have to use the latter DOCTYPE[/color]
                >>
                >>Why do you *have to* do that?[/color]
                >
                >
                > In Germay we have legal restraints how a web page has to be implemented to
                > be barrier free. So the doctype should contain also the URL to the DTD.[/color]

                I suppose you are referring to the BITV. Where does it say, that there
                must be a system identifier in the document type declaration?
                --
                Johannes Koch
                In te domine speravi; non confundar in aeternum.
                (Te Deum, 4th cent.)

                Comment

                • Stephan Koser

                  #9
                  Re: Fitting complete browserwindow


                  "Johannes Koch" <koch@w3develop ment.de> schrieb im Newsbeitrag
                  news:c12b1u$1ch p5q$1@ID-61067.news.uni-berlin.de...[color=blue]
                  > Stephan Koser wrote:[color=green]
                  > > "Christoph Paeper" <christoph.paep er@nurfuerspam. de> schrieb im[/color][/color]
                  Newsbeitrag[color=blue][color=green]
                  > > news:c126rs$1iv u$1@ariadne.rz. tu-clausthal.de...
                  > >[color=darkred]
                  > >>*Stephan Koser*:
                  > >>
                  > >>>Since I have to use the latter DOCTYPE
                  > >>
                  > >>Why do you *have to* do that?[/color]
                  > >
                  > >
                  > > In Germay we have legal restraints how a web page has to be implemented[/color][/color]
                  to[color=blue][color=green]
                  > > be barrier free. So the doctype should contain also the URL to the DTD.[/color]
                  >
                  > I suppose you are referring to the BITV. Where does it say, that there
                  > must be a system identifier in the document type declaration?[/color]

                  Well, perhaps I am wrong, but I interpreted condition 3.2 that way. Is says:
                  (sorry, but in original this is in german)

                  "Mittels Markup-Sprachen geschaffene Dokumente sind so zu erstellen und zu
                  deklarieren, dass sie gegen veröffentlichte formale Grammatiken validieren."
                  In (bad) english: documents created by markup languages have to be created
                  and decalred by validating against public grammars.

                  I thought this means that the DTD has to be included. Am I wrong (that would
                  be the easiest solution ;-))?

                  --
                  bye Stephan...

                  [color=blue]
                  > --
                  > Johannes Koch
                  > In te domine speravi; non confundar in aeternum.
                  > (Te Deum, 4th cent.)[/color]


                  Comment

                  • kaeli

                    #10
                    Re: Fitting complete browserwindow

                    In article <4034a91c$0$417 50$5fc3050@drea der2.news.tisca li.nl>,
                    els.aNOSPAM@tis cali.nl enlightened us with...[color=blue]
                    > You can set the height to the td instead, as long as you use
                    > css to do it, and not html. But even with css, it won't work
                    > on tr, only on td.
                    >
                    >[/color]

                    Define "works". :)

                    If you use IE quirks mode, as the OP originally did, IE does indeed set
                    the height of the TRs as specified.

                    --
                    --
                    ~kaeli~
                    What's another word for thesaurus?



                    Comment

                    • Steve Pugh

                      #11
                      Re: Fitting complete browserwindow

                      "Stephan Koser" <no-skoser-spam@web.de> wrote:[color=blue]
                      >"Johannes Koch" <koch@w3develop ment.de> schrieb im Newsbeitrag
                      >news:c12b1u$1c hp5q$1@ID-61067.news.uni-berlin.de...[color=green]
                      >>
                      >> I suppose you are referring to the BITV. Where does it say, that there
                      >> must be a system identifier in the document type declaration?[/color]
                      >
                      >Well, perhaps I am wrong, but I interpreted condition 3.2 that way. Is says:
                      >(sorry, but in original this is in german)
                      >
                      >"Mittels Markup-Sprachen geschaffene Dokumente sind so zu erstellen und zu
                      >deklarieren, dass sie gegen veröffentlichte formale Grammatiken validieren."
                      >In (bad) english: documents created by markup languages have to be created
                      >and decalred by validating against public grammars.[/color]

                      Sounds like 3.2 of the WAI guidelines (hardly surprising, most of the
                      national rules have copied the WAI guidelines with greater or lesser
                      numbers of changes).


                      "Create documents that validate to published formal grammars."
                      [color=blue]
                      >I thought this means that the DTD has to be included. Am I wrong (that would
                      >be the easiest solution ;-))?[/color]

                      Yes, it means you need to include a doctype declaration, but if that
                      doctype is a well known, well established, publically published one
                      then there's no need to include the URL. Any HTML validator (or other
                      software that (a) is likely to parse your page and (b) needs to know
                      about the actual DTD in use) will know about the HTML 4.01 DTD without
                      needing to be explicitly pointed at it. If you were using a custom
                      DTD, or a recently published one then including the URL would be a
                      good move.

                      There's also the completely unrelated issue of doctype sniffing and
                      quirks vs standards mode. As you found out including the URL triggers
                      standards mode in IE6. If you want to comply with the spirit as well
                      as the letter of any accessibility regulations then writing your pages
                      in Strict rather than Transitional and triggering Standards rather the
                      Quirks mode would probably be a good move. I'm not saying that
                      Transitional pages are automatically less accessible, just that
                      writing Strict pages may help to put you as the author in the mindset
                      to produce accessible pages.

                      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

                      • kaeli

                        #12
                        Re: Fitting complete browserwindow

                        In article <c125nu$4om$1@o nline.de>, no-skoser-spam@web.de enlightened
                        us with...[color=blue]
                        > Hi,
                        >
                        > I have a problem since I use a full DOCTYPE.
                        >[/color]

                        Not using the full doctype sends IE into quirks mode.
                        Hence your problem when you add it. It actually complies! *LOL*
                        [color=blue]
                        >
                        > This works very well. The whole content fits in the browser window.[/color]

                        If you want a header, content, and a footer to take up the whole window
                        even when there is not enough content to justify a whole window, use CSS
                        on divs, not tables (unless you need to support OLD browsers, then
                        you're stuck with the tables and might mudge by with changing the height
                        of the middle from 100% to 95%).

                        <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
                        "http://www.w3.org/TR/REC-html40/loose.dtd">
                        <html>
                        <head>
                        <style type="text/css">
                        #header {
                        height: 20px;
                        width: 100%;
                        border: thin solid navy;
                        position: relative;
                        float: top;
                        }
                        #main {
                        width: 100%;
                        position: relative;
                        }
                        #footer {
                        height: 50px;
                        width: 100%;
                        border: thin solid navy;
                        position: absolute;
                        bottom: 20px;
                        }

                        </style>
                        </head>
                        <body>
                        <div id="header">thi s is header content</div>
                        <div id="main">this is main content</div>
                        <div id="footer">thi s is footer content</div>
                        </body>
                        </html>

                        --
                        --
                        ~kaeli~
                        What's another word for thesaurus?



                        Comment

                        • Els

                          #13
                          Re: Fitting complete browserwindow

                          kaeli wrote:
                          [color=blue]
                          > In article <4034a91c$0$417 50$5fc3050@drea der2.news.tisca li.nl>,
                          > els.aNOSPAM@tis cali.nl enlightened us with...
                          >[color=green]
                          >>You can set the height to the td instead, as long as you use
                          >>css to do it, and not html. But even with css, it won't work
                          >>on tr, only on td.[/color]
                          >
                          > Define "works". :)
                          >
                          > If you use IE quirks mode, as the OP originally did, IE does indeed set
                          > the height of the TRs as specified.[/color]

                          True, but he wanted to add the url to the doctype, and then
                          he'll have to style the TDs.

                          --
                          Els

                          Mente humana é como pára-quedas; funciona melhor aberta.

                          Comment

                          • Brian

                            #14
                            Re: Fitting complete browserwindow

                            Stephan Koser wrote:[color=blue]
                            >
                            > I have a problem since I use a full DOCTYPE.[/color]

                            You seem to have a problem multiposting, too.





                            --
                            Brian (follow directions in my address to email me)


                            Comment

                            • Stephan Koser

                              #15
                              Re: Fitting complete browserwindow


                              "kaeli" <tiny_one@NOSPA M.comcast.net> schrieb im Newsbeitrag
                              news:MPG.1a9e8a 16e17cb016989c5 e@nntp.lucent.c om...[color=blue]
                              > In article <c125nu$4om$1@o nline.de>, no-skoser-spam@web.de enlightened[/color]
                              [color=blue]
                              > If you want a header, content, and a footer to take up the whole window
                              > even when there is not enough content to justify a whole window, use CSS
                              > on divs, not tables (unless you need to support OLD browsers, then
                              > you're stuck with the tables and might mudge by with changing the height
                              > of the middle from 100% to 95%).[/color]

                              Ok, actually we wanted to use tables. But DIVs would also be fine. Your
                              samle is ok, but when the main content si too large, it will flow over the
                              footer. That isn't nice.
                              We want to convert a page using frames to one without frames. I'm not quite
                              sure, if it is possible to get the same functionality. But what we want to
                              have is a fixed header on the very top and a fixed footer at the bottom of
                              the window. Between we want to have the content area, that is variable in
                              height. If the content is too large, we want to scroll only the 'main' area.
                              If this is not possible, it is ok, when we have to scroll the whole page.
                              But then the footer has to be at the end of the page. When the content is
                              not enough to fill the content area, the footer has to be at the bottom of
                              the window.
                              This should work in the most important Browsers (Netscape, Opera, Mozilla
                              and IE - also with little browser-specific modifications) and without
                              JavaScript.
                              I know this is very hard, but I hope there is a solution.
                              [color=blue]
                              >
                              > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
                              > "http://www.w3.org/TR/REC-html40/loose.dtd">
                              > <html>
                              > <head>
                              > <style type="text/css">
                              > #header {
                              > height: 20px;
                              > width: 100%;
                              > border: thin solid navy;
                              > position: relative;
                              > float: top;
                              > }
                              > #main {
                              > width: 100%;
                              > position: relative;
                              > }
                              > #footer {
                              > height: 50px;
                              > width: 100%;
                              > border: thin solid navy;
                              > position: absolute;
                              > bottom: 20px;
                              > }
                              >
                              > </style>
                              > </head>
                              > <body>
                              > <div id="header">thi s is header content</div>
                              > <div id="main">this is main content</div>
                              > <div id="footer">thi s is footer content</div>
                              > </body>
                              > </html>[/color]



                              Thanks.

                              --
                              bye Stephan...




                              Comment

                              Working...