Top margin unwanted

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Torbjørn Pettersen

    Top margin unwanted

    On http://www.fantafiction.com/forum/index.php there is a gap, but I don't
    really want it. Actually I don't want it at all. It's a discussion forum using
    phpBB. So if anyone has any experience in implementing phpBB, and has
    tips and tricks to share....

    --
    Torbjørn Pettersen
    Editor/Webmaster
    FantaFiction




  • Sean Berry

    #2
    Re: Top margin unwanted

    I am a back-end programmer by trade (so take everything I write with a grain
    of salt), but I think you can specify the positioning of the page contents
    with div tags.

    <DIV STYLE="position :absolute; top:0px; left:0px;">

    You can "probably" do something like:

    echo "<DIV STYLE=\"positio n:absolute; top:0px; left:0px;\">";

    <Current page content>

    echo "</DIV>


    I am definatly NOT SURE about this... but never-the-less, I think a div tag
    is the key.

    Hope this helps,
    Sean


    "Torbjørn Pettersen" <tpe AT broadpark DOT no> wrote in message
    news:40cb3d40$1 @news.broadpark .no...[color=blue]
    > On http://www.fantafiction.com/forum/index.php there is a gap, but I don't
    > really want it. Actually I don't want it at all. It's a discussion forum[/color]
    using[color=blue]
    > phpBB. So if anyone has any experience in implementing phpBB, and has
    > tips and tricks to share....
    >
    > --
    > Torbjørn Pettersen
    > Editor/Webmaster
    > FantaFiction
    >
    > www.fantafiction.com
    >
    >[/color]


    Comment

    • Spartanicus

      #3
      Re: Top margin unwanted

      "Sean Berry" <sean_berry@cox .net> wrote:
      [color=blue]
      >I am a back-end programmer by trade (so take everything I write with a grain
      >of salt), but I think you can specify the positioning of the page contents
      >with div tags.
      >
      ><DIV STYLE="position :absolute; top:0px; left:0px;">[/color]

      Please don't give any "advice" anymore about html/css, ever.

      --
      Spartanicus

      Comment

      • James Hunt

        #4
        Re: Top margin unwanted

        simple fix ......

        <body topmargin=0 marginheight=0>

        It will work with both Internet Explorer and Netscape..

        --
        JAMES HUNT
        "Torbjørn Pettersen" <tpe AT broadpark DOT no> wrote in message
        news:40cb3d40$1 @news.broadpark .no...[color=blue]
        > On http://www.fantafiction.com/forum/index.php there is a gap, but I don't
        > really want it. Actually I don't want it at all. It's a discussion forum[/color]
        using[color=blue]
        > phpBB. So if anyone has any experience in implementing phpBB, and has
        > tips and tricks to share....
        >
        > --
        > Torbjørn Pettersen
        > Editor/Webmaster
        > FantaFiction
        >
        > www.fantafiction.com
        >
        >[/color]


        Comment

        • Rijk van Geijtenbeek

          #5
          Re: Top margin unwanted

          On Mon, 14 Jun 2004 07:50:51 -0600, James Hunt
          <jameskorea2003 @hotmail.com> wrote:
          [color=blue]
          > simple fix ......
          >
          > <body topmargin=0 marginheight=0>
          >
          > It will work with both Internet Explorer and Netscape..[/color]

          'both'... there are more browser nowadays.

          This will work in any graphical browser released after 2000 except
          Netscape 4.x:

          body {margin: 0; padding: 0;}

          (in the page stylesheet)

          --
          Rijk van Geijtenbeek

          The Web is a procrastination apparatus:
          It can absorb as much time as is required to ensure that you
          won't get any real work done. - J.Nielsen

          Comment

          • Neal

            #6
            Re: Top margin unwanted

            On Mon, 14 Jun 2004 07:50:51 -0600, James Hunt
            <jameskorea2003 @hotmail.com> wrote:
            [color=blue]
            > simple fix ......
            >
            > <body topmargin=0 marginheight=0>
            >
            > It will work with both Internet Explorer and Netscape..
            >[/color]


            And it's invalid markup at least back to HTML 3.2. marginheight is valid
            in framesets, topmargin is not at all recommended for WWW authoring.

            Please don't advise this. It makes as much sense as advising someone to
            replace their car bumper with paper mache.

            Comment

            • Shawn K. Quinn

              #7
              Re: Top margin unwanted

              James Hunt wrote (not surprisingly, in TOFU format):
              [color=blue]
              > simple fix ......
              >
              > <body topmargin=0 marginheight=0>[/color]

              This isn't valid HTML in any version (2.0, 3.2, 4.0, XHTML 1.0, XHTML 1.1).
              Put simply, it's garbage that should be treated as though it doesn't exist.
              This is why browsers now use CSS, because with clutter like this all
              through an HTML document, it would be
              [color=blue]
              > It will work with both Internet Explorer and Netscape..[/color]

              First, the Navigator browser is no longer being released under the Netscape
              trademark. Second, there are dozens of browsers *besides* Internet Explorer
              (if you even call something a browser which is really a protocol engine
              that is flagrantly incompatible with standard HTTP which connects to a
              parsing engine that is flagrantly incompatible with standard HTML and a
              style engine that is egregiously incompatible with standard CSS) and
              Mozilla (which is the same code as the Netscape branded Navigator).

              Oh, after you get a clue about HTML, learn how to quote.

              --
              Shawn K. Quinn

              Comment

              • James Hunt

                #8
                Re: Top margin unwanted

                "topmargin" is from the initial proposal for the JavaScript based style
                sheets back in 96. By adding it to the <body> you are eliminating the need
                for adding anything to the <STYLE>. If "topmargin" is invalid then it would
                not work. However, it does work with the most commonly used browsers
                (Internet Explorer, Mozilla, Netscape, and Opera). If there is a browser
                that it does not work with please tell me.

                Looking at the page in reference I can see why one would not want to use
                this method.

                It would be easier to simply add to the existing stylesheet
                templates/subSilver/subSilver.cssLi ne 11 margin: 0;


                --
                JAMES HUNT



                "Neal" <neal413@yahoo. com> wrote in message
                news:opr9lqcqdw 6v6656@news.ind ividual.net...[color=blue]
                > On Mon, 14 Jun 2004 07:50:51 -0600, James Hunt
                > <jameskorea2003 @hotmail.com> wrote:
                >[color=green]
                > > simple fix ......
                > >
                > > <body topmargin=0 marginheight=0>
                > >
                > > It will work with both Internet Explorer and Netscape..
                > >[/color]
                >
                >
                > And it's invalid markup at least back to HTML 3.2. marginheight is valid
                > in framesets, topmargin is not at all recommended for WWW authoring.
                >
                > Please don't advise this. It makes as much sense as advising someone to
                > replace their car bumper with paper mache.[/color]


                Comment

                • Brian

                  #9
                  Re: Top margin unwanted

                  James Hunt wrote:
                  [color=blue]
                  > "topmargin" is from the initial proposal for the JavaScript based
                  > style sheets back in 96.[/color]

                  ....which was never accepted as a recommendation by anyone, but rather
                  was a(nother) attempt by Netscape to enforce its "extensions " (spit)
                  onto the www regardless of the consquences.
                  [color=blue]
                  > By adding it to the <body> you are eliminating the need for adding
                  > anything to the <STYLE>.[/color]

                  Nothing like turning an advantage on its head.
                  [color=blue]
                  > If "topmargin" is invalid then it would not work.[/color]

                  This post is getting funnier by the second.

                  BTW, kindly look up "top posting" in Google. And when you learn what
                  it is, be even kinder in not doing it here.

                  --
                  Brian (remove ".invalid" to email me)

                  Comment

                  • Neal

                    #10
                    Re: Top margin unwanted

                    On Mon, 14 Jun 2004 19:02:22 -0600, James Hunt
                    <jameskorea2003 @hotmail.com> wrote:
                    [color=blue]
                    > If "topmargin" is invalid then it would
                    > not work.[/color]

                    Bzzzzt. Sorry, you lose. But here's a copy of our home game...

                    W3C's easy-to-use markup validation service, based on SGML and XML parsers.

                    Comment

                    • James Hunt

                      #11
                      Re: Top margin unwanted


                      "Shawn K. Quinn" <skquinn@xeviou s.kicks-ass.net> wrote in message
                      news:XpGdnScxvZ Ny2FPdRVn-gg@speakeasy.ne t...[color=blue]
                      > James Hunt wrote (not surprisingly, in TOFU format):
                      >[color=green]
                      > > simple fix ......
                      > >
                      > > <body topmargin=0 marginheight=0>[/color]
                      >
                      > This isn't valid HTML in any version (2.0, 3.2, 4.0, XHTML 1.0, XHTML[/color]
                      1.1).[color=blue]
                      > Put simply, it's garbage that should be treated as though it doesn't[/color]
                      exist.[color=blue]
                      > This is why browsers now use CSS, because with clutter like this all
                      > through an HTML document, it would be
                      >[/color]

                      According to the O'Reilly HTML Definitive Guide TOPMARGIN was valid for HTML
                      2.0
                      and continues to be valid as per the latest publication in 2002.
                      [color=blue][color=green]
                      > > It will work with both Internet Explorer and Netscape..[/color]
                      >
                      > First, the Navigator browser is no longer being released under the[/color]
                      Netscape[color=blue]
                      > trademark. Second, there are dozens of browsers *besides* Internet[/color]
                      Explorer[color=blue]
                      > (if you even call something a browser which is really a protocol engine
                      > that is flagrantly incompatible with standard HTTP which connects to a
                      > parsing engine that is flagrantly incompatible with standard HTML and a
                      > style engine that is egregiously incompatible with standard CSS) and
                      > Mozilla (which is the same code as the Netscape branded Navigator).
                      >
                      > Oh, after you get a clue about HTML, learn how to quote.
                      >[/color]

                      I am not new to the world of HTML, thus that is why I have been using an
                      attribute that was introduced back in 96. It worked back then and it
                      continues
                      to work. As to validity, no this type of attribute is not valid as per W3C
                      Recommendations . However, becuase it does in fact work, it is by definition
                      "valid" code. If you find a browser that does not recognize this attribute
                      I will
                      glady recant.

                      It all boils down to whether or not you as the programer wishes to use:

                      <style type="text/css">
                      BODY {
                      margin: 0px;
                      }
                      </style>

                      or

                      <body topmargin="0">

                      I believe that this would be considered as a "formatting trick" which
                      according to
                      the FAQ is valid for discussion in this newsgroup.

                      ---
                      James Hunt


                      Comment

                      • James Hunt

                        #12
                        Re: Top margin unwanted

                        "Neal" <neal413@yahoo. com> wrote in message
                        news:opr9l559bo 6v6656@news.ind ividual.net...[color=blue]
                        > On Mon, 14 Jun 2004 19:02:22 -0600, James Hunt
                        > <jameskorea2003 @hotmail.com> wrote:
                        >[color=green]
                        > > If "topmargin" is invalid then it would
                        > > not work.[/color]
                        >
                        > Bzzzzt. Sorry, you lose. But here's a copy of our home game...
                        >
                        > http://validator.w3.org/docs/help.ht...idation_basics[/color]

                        " The process of verifying whether a document actually follows the rules for
                        the language(s) it uses is called validation, and the tool used for that is
                        a validator. A document that passes this process with success is called
                        valid."

                        This only proves my point. Whether or not something is valid is based on
                        the tool you use to validate it. No, this attribute is not recommended by
                        the W3C. I never said that it was. However, in order to display a document
                        a browser must interpret the document. Thus, if an attribute gives you the
                        results that you want and it does in fact work it is valid according the
                        developers of the specific browser. According to the authors of the
                        O'Reilly's HTML & XHTML: The Definitive Guide, 5th Edition this attribute
                        is valid.

                        ---
                        James Hunt


                        Comment

                        • Steve Pugh

                          #13
                          Re: Top margin unwanted

                          "James Hunt" <jameskorea2003 @hotmail.com> wrote:
                          [color=blue]
                          >"topmargin" is from the initial proposal for the JavaScript based style
                          >sheets back in 96.[/color]

                          Are you sure? JSSS were a Netscape proposal and topmargin is a
                          Microsoft invention (supported by IE2+ and only _much_ later other
                          browsers) whilst Netscape 4 introduced support for the other bit of
                          clutter you suggested - marginheight.

                          Whilst the JSSS proposal did contain a topMargin property (and being a
                          JS derived language the capitalisation is important) I don't think
                          Microsoft were trying to support this in any way. For starters nothing
                          in the JSSS proposal speaks about putting JSSS styles directly as HTML
                          attributes and there's also the fact that IE2 predates the JSSS
                          proposal by ten months.
                          [color=blue]
                          > By adding it to the <body> you are eliminating the need
                          >for adding anything to the <STYLE>.[/color]

                          Yes, by adding it to every <body> on every page you are eliminating
                          the need to add it once to a single stylesheet. Um....
                          [color=blue]
                          >If "topmargin" is invalid then it would
                          >not work.[/color]

                          Rubbish. valid and invalid have a precise technical meaing in the
                          context of HTML and whether something works or not in some group of
                          browsers has nothing to do with that.

                          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

                          • Alan J. Flavell

                            #14
                            Re: Top margin unwanted

                            On Tue, 15 Jun 2004, James Hunt wrote:
                            [color=blue]
                            > According to the O'Reilly HTML Definitive Guide TOPMARGIN was valid
                            > for HTML 2.0[/color]

                            Just shows how much credence one can put in anything that calls itself
                            "definitive ". HTML 2.0 is defined by RFC1866: the RFC doesn't need to
                            call itself "definitive ", because it -is- definitive.
                            [color=blue]
                            > and continues to be valid as per the latest publication in 2002.[/color]

                            Come back when you have a clue...?
                            [color=blue][color=green]
                            > > Oh, after you get a clue about HTML, learn how to quote.[/color]
                            >
                            > I am not new to the world of HTML,[/color]

                            I couldn't possibly comment.
                            [color=blue]
                            > It worked back then and it continues to work.[/color]

                            Since there's no definitive statement about what it does, you have no
                            authoritative test against which you can make that claim.
                            [color=blue]
                            > As to validity, no this type of attribute is not valid as per W3C
                            > Recommendations . However, becuase it does in fact work, it is by definition
                            > "valid" code.[/color]

                            Oh, this is now way beyond a joke. plonk.

                            Comment

                            • Chris Morris

                              #15
                              Re: Top margin unwanted

                              "James Hunt" <jameskorea2003 @hotmail.com> writes:[color=blue]
                              > [topmargin]
                              > I am not new to the world of HTML, thus that is why I have been
                              > using an attribute that was introduced back in 96. It worked back
                              > then and it continues to work.[/color]

                              And being from 1996, has since been superceded by more maintainable
                              alternatives in CSS.
                              [color=blue]
                              > If you find a browser that does not recognize this attribute I will
                              > glady recant.[/color]

                              Links 2 doesn't. Even in graphical mode. Though it has a default top
                              margin of zero anyway.

                              Other browsers on my system that don't support it:
                              - lynx
                              - w3m
                              - dillo
                              - chimera2
                              - elinks
                              (all, I think, the latest versions)
                              [color=blue]
                              > It all boils down to whether or not you as the programer wishes to use:
                              >
                              > <style type="text/css">
                              > BODY {
                              > margin: 0px;
                              > }
                              > </style>
                              >
                              > or
                              >
                              > <body topmargin="0">[/color]

                              Neither, I'd put the style rule in an external stylesheet and use
                              <link>. Far more maintainable.

                              --
                              Chris

                              Comment

                              Working...