Create a cell of height 1px

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

    Create a cell of height 1px

    I want a row/cell of 1px height. This is what I have tried to achieve
    that.
    <TR><TD><IMG HEIGHT=1
    SRC='http://myserver.com/blank-small.gif'></TD></TR>

    However, the row does take more than 1px. I have tried resizing the
    image even smaller, but in vain. Where am I going wrong?
    Any advice and suggestions will be greatly appreciated.

    Regards,
    Rithish.
  • Spartanicus

    #2
    Re: Create a cell of height 1px

    rithish@gmail.c om (Rithish Saralaya) wrote:
    [color=blue]
    >I want a row/cell of 1px height. This is what I have tried to achieve
    >that.
    ><TR><TD><IMG HEIGHT=1
    >SRC='http://myserver.com/blank-small.gif'></TD></TR>
    >
    >However, the row does take more than 1px. I have tried resizing the
    >image even smaller, but in vain. Where am I going wrong?[/color]

    You are abusing markup to do layouts, use css, Google to get up to speed
    with it.

    --
    Spartanicus

    Comment

    • Karl Groves

      #3
      Re: Create a cell of height 1px


      "Rithish Saralaya" <rithish@gmail. com> wrote in message
      news:68a92be4.0 408230426.6c609 2ff@posting.goo gle.com...[color=blue]
      > I want a row/cell of 1px height. This is what I have tried to achieve
      > that.
      > <TR><TD><IMG HEIGHT=1
      > SRC='http://myserver.com/blank-small.gif'></TD></TR>
      >
      > However, the row does take more than 1px. I have tried resizing the
      > image even smaller, but in vain. Where am I going wrong?
      > Any advice and suggestions will be greatly appreciated.
      >
      > Regards,
      > Rithish.[/color]

      My my my. That certainly doesn't look like tabular data to me...

      -Karl


      Comment

      • Jukka K. Korpela

        #4
        Re: Create a cell of height 1px

        rithish@gmail.c om (Rithish Saralaya) wrote:
        [color=blue]
        > I want a row/cell of 1px height.[/color]

        Stop wanting that.
        [color=blue]
        > <TR><TD><IMG HEIGHT=1
        > SRC='http://myserver.com/blank-small.gif'></TD></TR>[/color]

        Post a URL, not an incorrect snippet of code.
        [color=blue]
        > However, the row does take more than 1px.[/color]

        There are 42 possible reasons to that. The most probable is perhaps that
        you have a positive value for cellspacing (perhaps by browser defaults).
        [color=blue]
        > Where am I going wrong?[/color]

        You are not telling what you are really aiming at, you are not posting
        the URL, you are using tables for layout pointlessly, and you are using
        invalid markup.

        --
        Yucca, http://www.cs.tut.fi/~jkorpela/
        Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

        Comment

        • Henri Sivonen

          #5
          Re: Create a cell of height 1px

          In article <68a92be4.04082 30426.6c6092ff@ posting.google. com>,
          rithish@gmail.c om (Rithish Saralaya) wrote:
          [color=blue]
          > I want a row/cell of 1px height.[/color]
          [color=blue]
          > However, the row does take more than 1px.[/color]

          The MDN Web Docs site provides information about Open Web technologies including HTML, CSS, and APIs for both Web sites and progressive web apps.


          --
          Henri Sivonen
          hsivonen@iki.fi

          Mozilla Web Author FAQ: http://mozilla.org/docs/web-developer/faq.html

          Comment

          • Rithish Saralaya

            #6
            Re: Create a cell of height 1px

            "Jukka K. Korpela" wrote[color=blue][color=green]
            > > I want a row/cell of 1px height.[/color]
            >
            > Stop wanting that.
            >[/color]

            Egads !!! I must have stirred a hornet's nest !! :o) I did not want
            to burden all with the whole complexity of whatever problem I am
            facing. But now, since all seem to be interested, here goes... I want
            to create a custom toolbar with vertical drop-down menus ( Please
            don't question as to why I am reinventing the wheel again.. I am
            not... A drop-down menu is one among many of the functions required of
            the toolbar ) I want to mark a seperator between individual items of
            the menu ( The menu is a table with items as rows of it, each row
            containing a single cell ). The seperator row/cell will have no text
            in it, but a bottom border, thus emulating a seperator line. I thought
            setting <TD>&nbsp;</TD> with the 'Font-Size' style to 1px would be
            incorrect. Hence, the reason I opted to use an image ( albeit a very
            small one, of height 1px ). How am I wrong in wanting a row/cell of
            1px height? Please... I would be glad to be enlightened...
            [color=blue][color=green]
            > > <TR><TD><IMG HEIGHT=1
            > > SRC='http://myserver.com/blank-small.gif'></TD></TR>[/color]
            >
            > Post a URL, not an incorrect snippet of code.
            >[/color]

            If I were able to post a URL, I would have ( I am working in a
            restricted environment ). How incorrect is the snippet?

            [color=blue][color=green]
            > > However, the row does take more than 1px.[/color]
            >
            > There are 42 possible reasons to that. The most probable is perhaps that
            > you have a positive value for cellspacing (perhaps by browser defaults).
            >[/color]

            I agree. I found the reason soon as I posted my query. Actually, it
            was reason no 41. :o) I had a positive value for cellpadding.
            [color=blue][color=green]
            > > Where am I going wrong?[/color]
            >
            > You are not telling what you are really aiming at, you are not posting
            > the URL, you are using tables for layout pointlessly, and you are using
            > invalid markup.[/color]

            Think I have satisfied all troubled minds... I am yet a novice at
            this. I apologize for being so naive...

            Regards,
            Rithish.

            Comment

            • Jukka K. Korpela

              #7
              Re: Create a cell of height 1px

              rithish@gmail.c om (Rithish Saralaya) wrote:
              [color=blue]
              > I must have stirred a hornet's nest !![/color]

              Welcome to Usenet.
              "Get real! This is a discussion group[,] not a helpdesk. You post
              something[,] we discuss it's implications. If the discussion happens to
              answer a question you've asked[,] that's incidental."
              nobull, 2000-10-25 in comp.lang.perl. misc
              [color=blue]
              > I did not want
              > to burden all with the whole complexity of whatever problem I am
              > facing.[/color]

              Oh, but we love to do just that.
              [color=blue]
              > I want
              > to create a custom toolbar with vertical drop-down menus[/color]

              Stop wanting that, too.
              [color=blue]
              > ( Please
              > don't question as to why I am reinventing the wheel again..[/color]

              I'm not. I'm simply stating the fact that you are doing the wrong thing,
              and probably the wrong way too.
              [color=blue][color=green][color=darkred]
              >> > <TR><TD><IMG HEIGHT=1
              >> > SRC='http://myserver.com/blank-small.gif'></TD></TR>[/color]
              >>
              >> Post a URL, not an incorrect snippet of code.
              >>[/color]
              >
              > If I were able to post a URL, I would have ( I am working in a
              > restricted environment ).[/color]

              Which part of the term "www" do you fail to understand?
              [color=blue]
              > How incorrect is the snippet?[/color]

              Very incorrect, starting from being invalid, accessibility-hostile, and
              pointless.
              [color=blue]
              > Think I have satisfied all troubled minds...[/color]

              Not really. And your basic problems remain, but after all, it's you and
              your users that need to live with them, not most of us.
              [color=blue]
              > I apologize for being so naive...[/color]

              Not really. A naive man would have told directly what he is doing and
              how.

              --
              Yucca, http://www.cs.tut.fi/~jkorpela/
              Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

              Comment

              • Frances Del Rio

                #8
                Re: Create a cell of height 1px

                this is what I do when I need very thin rows (or very narrow cells):

                in css I define:

                ..spacer {font-size:1px}

                then in table:

                <tr><td class="spacer" height=1>&nbsp; </td></tr>

                or

                <tr><td class="spacer" width=1>&nbsp;</td></tr>


                hope this helps... Frances


                Rithish Saralaya wrote:[color=blue]
                > I want a row/cell of 1px height. This is what I have tried to achieve
                > that.
                > <TR><TD><IMG HEIGHT=1
                > SRC='http://myserver.com/blank-small.gif'></TD></TR>
                >
                > However, the row does take more than 1px. I have tried resizing the
                > image even smaller, but in vain. Where am I going wrong?
                > Any advice and suggestions will be greatly appreciated.
                >
                > Regards,
                > Rithish.[/color]

                Comment

                • HchC

                  #9
                  Re: Create a cell of height 1px

                  Well, because you are not using the XHTML standard, so it doesn't work!
                  Sorry, It's a joke!

                  "Rithish Saralaya" <rithish@gmail. com> ?????
                  news:68a92be4.0 408230426.6c609 2ff@posting.goo gle.com...[color=blue]
                  > I want a row/cell of 1px height. This is what I have tried to achieve
                  > that.
                  > <TR><TD><IMG HEIGHT=1
                  > SRC='http://myserver.com/blank-small.gif'></TD></TR>
                  >
                  > However, the row does take more than 1px. I have tried resizing the
                  > image even smaller, but in vain. Where am I going wrong?
                  > Any advice and suggestions will be greatly appreciated.
                  >
                  > Regards,
                  > Rithish.[/color]


                  Comment

                  Working...