td tag border

Discussion in 'HTML' started by Haris Bogdanovich, Nov 20, 2011.

  1. Why the td tag has no border
    if it's empty ?
    How to fix that ?

    Thanks
    Haris Bogdanovich, Nov 20, 2011
    #1
    1. Advertising

  2. Haris Bogdanovich wrote:

    > Why the td tag has no border
    > if it's empty ?
    > How to fix that ?


    I see a lot of this: <td>&nbsp;</td>

    --
    -bts
    -This space for rent, but the price is high
    Beauregard T. Shagnasty, Nov 20, 2011
    #2
    1. Advertising

  3. 2011-11-20 21:53, Beauregard T. Shagnasty wrote:

    > Haris Bogdanovich wrote:
    >
    >> Why the td tag has no border
    >> if it's empty ?
    >> How to fix that ?

    >
    > I see a lot of this:<td>&nbsp;</td>


    Yes, and it usually helps, but sometimes it's not applicable. Using the
    no-break space implies some minimal width and height for the cell, and
    this might not desirable in contexts where a cell with empty contents is
    used.

    Workarounds include the use of a single-pixel transparent image. But
    usually solutions are better than workarounds: ask yourself why the cell
    is empty, and you may find a reason to put some actual content there.
    More on this:
    http://www.cs.tut.fi/~jkorpela/HTML/emptycells.html

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Nov 20, 2011
    #3
  4. Haris Bogdanovich

    Ray_Net Guest

    In article <jabo52$fn5$>, says...
    >
    > 2011-11-20 21:53, Beauregard T. Shagnasty wrote:
    >
    > > Haris Bogdanovich wrote:
    > >
    > >> Why the td tag has no border
    > >> if it's empty ?
    > >> How to fix that ?

    > >
    > > I see a lot of this:<td>&nbsp;</td>

    >
    > Yes, and it usually helps, but sometimes it's not applicable. Using the
    > no-break space implies some minimal width and height for the cell, and
    > this might not desirable in contexts where a cell with empty contents is
    > used.
    >
    > Workarounds include the use of a single-pixel transparent image. But
    > usually solutions are better than workarounds: ask yourself why the cell
    > is empty, and you may find a reason to put some actual content there.
    > More on this:
    > http://www.cs.tut.fi/~jkorpela/HTML/emptycells.html


    Very good examples in your page rendered differently if using IE9 or
    SeaMonkey. With SeaMonkey, we dont have a border for the two cases and
    for the one pixel picture, the row is minimized with SeaMonkey and as
    high as the other with IE9.
    Ray_Net, Nov 20, 2011
    #4
  5. 2011-11-21 1:07, Ray_Net wrote:

    >> http://www.cs.tut.fi/~jkorpela/HTML/emptycells.html

    >
    > Very good examples in your page rendered differently if using IE9 or
    > SeaMonkey. With SeaMonkey, we dont have a border for the two cases and
    > for the one pixel picture, the row is minimized with SeaMonkey and as
    > high as the other with IE9.


    I'm not sure of what you mean here. I just downloaded and installed
    SeaMonkey on Windows 7 Pro and checked the page on it. As far as I can
    see, SeaMonkey draws borders around cells containing &nbsp;.

    And both on IE 9 and Seamonkey show a "minimized" row when the only cell
    contains only a one-pixel image. (The row is a few pixels high due to
    default cellpadding.)

    Are you using some special environment or setting=

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Nov 21, 2011
    #5
  6. Haris Bogdanovich

    Ray_Net Guest

    In article <jad5h5$tu1$>, says...
    >
    > 2011-11-21 1:07, Ray_Net wrote:
    >
    > >> http://www.cs.tut.fi/~jkorpela/HTML/emptycells.html

    > >
    > > Very good examples in your page rendered differently if using IE9 or
    > > SeaMonkey. With SeaMonkey, we dont have a border for the two cases and
    > > for the one pixel picture, the row is minimized with SeaMonkey and as
    > > high as the other with IE9.

    >
    > I'm not sure of what you mean here. I just downloaded and installed
    > SeaMonkey on Windows 7 Pro and checked the page on it. As far as I can
    > see, SeaMonkey draws borders around cells containing &nbsp;.
    >
    > And both on IE 9 and Seamonkey show a "minimized" row when the only cell
    > contains only a one-pixel image. (The row is a few pixels high due to
    > default cellpadding.)
    >
    > Are you using some special environment or setting=


    All my settings are the default settings.
    You can see the screen-copies SM-1, SM-2, IE9-1 and IE9-2 here
    http://cjoint.com/?0KwaY0MytYX
    Ray_Net, Nov 21, 2011
    #6
  7. Haris Bogdanovich

    BootNic Guest

    On Mon, 21 Nov 2011 11:27:02 +0200
    "Jukka K. Korpela" <> wrote:

    [snip]

    > And both on IE 9 and Seamonkey show a "minimized" row when the only cell
    > contains only a one-pixel image. (The row is a few pixels high due to
    > default cellpadding.)


    As they do with an empty cell yes?

    [snip]



    --
    BootNic Mon Nov 21, 2011 10:27 pm
    "They may forget what you said, but they will never forget how you made them
    feel."
    *Carl W. Buechner*

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.11 (GNU/Linux)

    iEYEARECAAYFAk7LFrQACgkQOcdbyBqMFBHq7wCfWa0UkTUhqGCHbmWC5kL+Lb0E
    k3YAoLGv5hD3kGHr9kCWCsU+0JkBFCZw
    =LojE
    -----END PGP SIGNATURE-----
    BootNic, Nov 22, 2011
    #7
  8. Haris Bogdanovich

    BootNic Guest

    On Sun, 20 Nov 2011 20:50:21 +0100
    "Haris Bogdanovich" <> wrote:

    > Why the td tag has no border if it's empty ? How to fix that ?


    Update the browser.

    Failing in that effort … one may try to add frame="border" to thetable.

    https://docs.google.com/leaf?id=0B...zQyNC00MWZmLWIyYzUtYWFkZmFjNjM5NmVl&hl=en_US


    --
    BootNic Mon Nov 21, 2011 10:39 pm
    The human mind treats a new idea the same way the body treats a strange
    protein; it rejects it.
    *P. B. Medawar*

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.11 (GNU/Linux)

    iEYEARECAAYFAk7LGYAACgkQOcdbyBqMFBG7VwCg0UYMnIrcy1AOePjJ6ApfYEBm
    kh4AoKGC6kCupFStB+Sq0tO5H1vsY6aR
    =/dKl
    -----END PGP SIGNATURE-----
    BootNic, Nov 22, 2011
    #8
  9. 2011-11-22 1:55, Ray_Net wrote:

    > You can see the screen-copies SM-1, SM-2, IE9-1 and IE9-2 here
    > http://cjoint.com/?0KwaY0MytYX


    Thank you, this helps. The SeaMonkey rendering seems to have borders
    around the empty cell - but the border style is the browser default,
    which may not look like a real border. I have modified my page
    http://www.cs.tut.fi/~jkorpela/html/emptycells.html
    to set border style, color, and width more prominent.

    On IE, it's more complicated. The rendering on IE 9 depends on the
    browser mode and on its idea of document mode - a real mess. If you F12
    on IE 9, you can test the effects of various modes. In the modern modes,
    IE 9 shows a border even around empty cells, so the problem does not
    appear there. But the dual problem exists: if you do _not_ want borders
    around an empty cell, you need to explicitly prevent them. Luckily this
    is easy on modern browsers using CSS (either set empty-cells: show on
    the table element or set border: none on the cell).

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Nov 22, 2011
    #9
  10. Haris Bogdanovich

    Ray_Net Guest

    In article <jah8tc$qok$>, says...
    >
    > 2011-11-22 1:55, Ray_Net wrote:
    >
    > > You can see the screen-copies SM-1, SM-2, IE9-1 and IE9-2 here
    > > http://cjoint.com/?0KwaY0MytYX

    >
    > Thank you, this helps. The SeaMonkey rendering seems to have borders
    > around the empty cell - but the border style is the browser default,
    > which may not look like a real border. I have modified my page
    > http://www.cs.tut.fi/~jkorpela/html/emptycells.html
    > to set border style, color, and width more prominent.
    >
    > On IE, it's more complicated. The rendering on IE 9 depends on the
    > browser mode and on its idea of document mode - a real mess. If you F12
    > on IE 9, you can test the effects of various modes. In the modern modes,
    > IE 9 shows a border even around empty cells, so the problem does not
    > appear there. But the dual problem exists: if you do _not_ want borders
    > around an empty cell, you need to explicitly prevent them. Luckily this
    > is easy on modern browsers using CSS (either set empty-cells: show on
    > the table element or set border: none on the cell).


    There is still a problem on the example number 4 with the little pic of
    one pixel in the cell. With SM the row height is null - with IE9 this
    row have the same height as the others.
    Ray_Net, Nov 23, 2011
    #10
  11. 2011-11-23 12:33, Ray_Net wrote:

    > There is still a problem on the example number 4 with the little pic of
    > one pixel in the cell. With SM the row height is null - with IE9 this
    > row have the same height as the others.


    It seems that from version 8, IE imposes some minimum height on a cell
    that contains an image, even when there is no text in the cell. Firefox
    does that, too. I wonder why they have made this change, as it probably
    breaks many layouts (though maybe not very seriously).

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Nov 23, 2011
    #11
  12. Ray_Net wrote:
    > There is still a problem on the example number 4 with the little pic of
    > one pixel in the cell. With SM the row height is null


    Not in my SeaMonkey! Not even with Mozilla 1.0 the "daddy" of SeaMonkey...

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Nov 23, 2011
    #12
  13. 2011-11-23 17:39, Jonathan N. Little wrote:

    > Ray_Net wrote:
    >> There is still a problem on the example number 4 with the little pic of
    >> one pixel in the cell. With SM the row height is null

    >
    > Not in my SeaMonkey! Not even with Mozilla 1.0 the "daddy" of SeaMonkey...


    I can't explain that, but I have now modernized the page
    http://www.cs.tut.fi/~jkorpela/html/emptycells.html
    somewhat and added notes about preventing borders.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Nov 23, 2011
    #13
  14. Jukka K. Korpela wrote:
    > 2011-11-23 17:39, Jonathan N. Little wrote:
    >
    >> Ray_Net wrote:
    >>> There is still a problem on the example number 4 with the little pic of
    >>> one pixel in the cell. With SM the row height is null

    >>
    >> Not in my SeaMonkey! Not even with Mozilla 1.0 the "daddy" of
    >> SeaMonkey...

    >
    > I can't explain that, but I have now modernized the page
    > http://www.cs.tut.fi/~jkorpela/html/emptycells.html
    > somewhat and added notes about preventing borders.
    >


    Maybe you misunderstood me, the 1px GIF worked just fine in my SeaMonkey
    and even an old Mozilla 1.0 that I have running an a VM. This is in
    contrast to what Ray wrote, I don't think it is SeaMonkey but some other
    factor on his setup...

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Nov 23, 2011
    #14
  15. Haris Bogdanovich

    Ray_Net Guest

    In article <jajdka$q2h$>, says...
    >
    > 2011-11-23 17:39, Jonathan N. Little wrote:
    >
    > > Ray_Net wrote:
    > >> There is still a problem on the example number 4 with the little pic of
    > >> one pixel in the cell. With SM the row height is null

    > >
    > > Not in my SeaMonkey! Not even with Mozilla 1.0 the "daddy" of SeaMonkey...

    >
    > I can't explain that, but I have now modernized the page
    > http://www.cs.tut.fi/~jkorpela/html/emptycells.html
    > somewhat and added notes about preventing borders.


    Now with your new page SM and IE9 rendering is the same.
    The two first foo-bar-zap-zip have the center row the same height as the
    other. The thirth foo-bar-zap-zip have the center row a very small
    height comparing with the others.
    Ray_Net, Nov 23, 2011
    #15
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. tshad
    Replies:
    0
    Views:
    2,228
    tshad
    Jan 31, 2005
  2. shruds
    Replies:
    1
    Views:
    709
    John C. Bollinger
    Jan 27, 2006
  3. phl
    Replies:
    1
    Views:
    4,320
    Martin Jay
    Jun 8, 2006
  4. Coder
    Replies:
    1
    Views:
    672
    Cowboy \(Gregory A. Beamer\)
    Jun 24, 2006
  5. =?UTF-8?B?TWFydGluIFDDtnBwaW5n?=

    border-color: #003366; border-width: 2px;

    =?UTF-8?B?TWFydGluIFDDtnBwaW5n?=, Jul 17, 2006, in forum: HTML
    Replies:
    64
    Views:
    3,459
    Adrienne Boswell
    Jul 30, 2006
Loading...

Share This Page