empty cells in a table not displaying correctly

Discussion in 'HTML' started by Jud McCranie, Nov 28, 2007.

  1. Jud McCranie

    Jud McCranie Guest

    I'm doing cells in a table with
    <TD align="right">text</TD>
    When the text is blank, the table isn't displaying correctly in IE and
    Firefox - the walls of the cell aren't drawn (although they are spaced
    correctly). I've tried leaving the "text" blank and putting blank
    characters in there, neither work.

    How can I get it to draw the walls of the cell if the text is blank?
    --
    Replace you know what by j to email
     
    Jud McCranie, Nov 28, 2007
    #1
    1. Advertising

  2. Jud McCranie

    rf Guest

    "Jud McCranie" <> wrote in message
    news:...
    > I'm doing cells in a table with
    > <TD align="right">text</TD>
    > When the text is blank, the table isn't displaying correctly in IE and
    > Firefox - the walls of the cell aren't drawn (although they are spaced
    > correctly).


    That is what is supposed to happen.

    >I've tried leaving the "text" blank and putting blank
    > characters in there, neither work.
    >
    > How can I get it to draw the walls of the cell if the text is blank?


    &nbsp;

    --
    Richard.
     
    rf, Nov 28, 2007
    #2
    1. Advertising

  3. Gazing into my crystal ball I observed Jud McCranie
    <> writing in
    news::

    > I'm doing cells in a table with
    ><TD align="right">text</TD>
    > When the text is blank, the table isn't displaying correctly in IE and
    > Firefox - the walls of the cell aren't drawn (although they are spaced
    > correctly). I've tried leaving the "text" blank and putting blank
    > characters in there, neither work.
    >
    > How can I get it to draw the walls of the cell if the text is blank?


    Use the empty cell property - http://tinyurl.com/8nztn

    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
     
    Adrienne Boswell, Nov 28, 2007
    #3
  4. Jud McCranie

    Jud McCranie Guest

    On Wed, 28 Nov 2007 06:14:22 GMT, "rf" <> wrote:

    >&nbsp;


    That works, thanks. That puts a half space in there, right?

    --
    Replace you know what by j to email
     
    Jud McCranie, Nov 28, 2007
    #4
  5. Jud McCranie

    Jud McCranie Guest

    On Wed, 28 Nov 2007 06:15:10 GMT, Adrienne Boswell <>
    wrote:

    >Use the empty cell property - http://tinyurl.com/8nztn


    I couldn't get that to work. I tried:
    <TABLE border=1 width="60%" empty-cells: show>
    <TABLE border=1 width="60%" empty-cells=show>
    but neither worked. What's wrong?
    --
    Replace you know what by j to email
     
    Jud McCranie, Nov 28, 2007
    #5
  6. Jud McCranie wrote:
    > On Wed, 28 Nov 2007 06:14:22 GMT, "rf" <> wrote:
    >
    >> &nbsp;

    >
    > That works, thanks. That puts a half space in there, right?
    >

    No half-space. It puts in a full non-breaking space, however the browser
    happens to interpret that.
     
    Harlan Messinger, Nov 28, 2007
    #6
  7. Jud McCranie wrote:
    > On Wed, 28 Nov 2007 06:15:10 GMT, Adrienne Boswell <>
    > wrote:
    >
    >> Use the empty cell property - http://tinyurl.com/8nztn

    >
    > I couldn't get that to work. I tried:
    > <TABLE border=1 width="60%" empty-cells: show>
    > <TABLE border=1 width="60%" empty-cells=show>
    > but neither worked. What's wrong?


    It is a CSS property not an HTML attribute.

    either in your stylesheet add

    table { empty-cells: show; }

    or put inline in the HTML attribute STYLE:

    <TABLE border=1 width="60%" style="empty-cells: show;">

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Nov 28, 2007
    #7
  8. Jud McCranie

    Jud McCranie Guest

    On Wed, 28 Nov 2007 12:35:30 -0500, "Jonathan N. Little"
    <> wrote:

    ><TABLE border=1 width="60%" style="empty-cells: show;">


    That works in Firefox but not IE. (However, the &nbsp; works in
    both).

    I'm not very familiar with HTML - I'm writing a program that generates
    some HYML tables as output.
    --
    Replace you know what by j to email
     
    Jud McCranie, Nov 28, 2007
    #8
  9. Jud McCranie wrote:
    > On Wed, 28 Nov 2007 12:35:30 -0500, "Jonathan N. Little"
    > <> wrote:
    >
    >> <TABLE border=1 width="60%" style="empty-cells: show;">

    >
    > That works in Firefox but not IE. (However, the &nbsp; works in
    > both).


    You now know a web designer's pain, it is summed up in two little
    letters...IE!


    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Nov 28, 2007
    #9
  10. Jud McCranie

    Jud McCranie Guest

    On Wed, 28 Nov 2007 16:24:39 -0500, "Jonathan N. Little"
    <> wrote:

    >> That works in Firefox but not IE. (However, the &nbsp; works in
    >> both).

    >
    >You now know a web designer's pain, it is summed up in two little
    >letters...IE!


    Yes, I would have thought that IE would be standard.
    --
    Replace you know what by j to email
     
    Jud McCranie, Nov 28, 2007
    #10
  11. Jud McCranie

    Ed Mullen Guest

    Jud McCranie wrote:
    > On Wed, 28 Nov 2007 16:24:39 -0500, "Jonathan N. Little"
    > <> wrote:
    >
    >>> That works in Firefox but not IE. (However, the &nbsp; works in
    >>> both).

    >> You now know a web designer's pain, it is summed up in two little
    >> letters...IE!

    >
    > Yes, I would have thought that IE would be standard.


    Depends on what you mean by "standard."

    Ubiquitous? Ok, IE is that.

    Conforming to accepted agree-upon industry standards? No, IE is
    decidedly not. IE7 is getting closer, for sure. Still, anything less
    is a morass into which no sane Web page creator wants to willingly go.

    --
    Ed Mullen
    http://edmullen.net
    http://mozilla.edmullen.net
    http://abington.edmullen.net
    I can't see the point in the theatre. All that sex and violence. I get
    enough of that at home. Apart from the sex, of course. - Baldrick -
    Sense and Senility
     
    Ed Mullen, Nov 29, 2007
    #11
  12. Jud McCranie

    Jud McCranie Guest

    On Wed, 28 Nov 2007 19:38:34 -0500, Ed Mullen <> wrote:

    >Depends on what you mean by "standard."


    I meant "adhering to standards" rather than being widespread (i.e. a
    de facto standard).
    --
    Replace you know what by j to email
     
    Jud McCranie, Nov 29, 2007
    #12
  13. Jud McCranie

    Ed Mullen Guest

    Jud McCranie wrote:
    > On Wed, 28 Nov 2007 19:38:34 -0500, Ed Mullen <> wrote:
    >
    >> Depends on what you mean by "standard."

    >
    > I meant "adhering to standards" rather than being widespread (i.e. a
    > de facto standard).


    Then, no, IE is decidedly not standard. It is an amalgam of proprietary
    implementations of standards rendering them incompatible with the
    standards. And, it implements many things that do not exist in the
    standards and, hence, nothing other than IE can deal with without
    extreme work-around programming.

    Did that help?

    --
    Ed Mullen
    http://edmullen.net
    http://mozilla.edmullen.net
    http://abington.edmullen.net
    One of the great tragedies of life is the murder of a beautiful theory
    by a gang of brutal facts. - Benjamin Franklin
     
    Ed Mullen, Nov 29, 2007
    #13
  14. Jud McCranie

    Jud McCranie Guest

    On Wed, 28 Nov 2007 21:05:16 -0500, Ed Mullen <> wrote:

    >Did that help?


    Yes, it did. I have my program working correctly, thanks to everyone
    who replied.
    --
    Replace you know what by j to email
     
    Jud McCranie, Nov 29, 2007
    #14
  15. Scripsit Jud McCranie:

    >> &nbsp;

    >
    > That works, thanks. That puts a half space in there, right?


    No, by definition &nbsp; means the NO-BREAK SPACE character, which is
    like the SPACE but probihits line breaks before and after (which means
    nothing here) and, as a strange effect due to oddities in web browsers,
    partly described in HTML specs, acts as nonempty content in a table
    cell.

    So it's more or less a hack but it works, mostly. It causes trouble if
    you want to make the cell very small in either direction, since NO-BREAK
    SPACE has some definite width and some height.

    It's a good idea to consider whether it would be better to insert some
    other content into the cell, such as "N/A" or "0" or "&ndash;" or
    whatever constitutes a useful indication or hint. After all, the user
    might not immediately realize _why_ the cell is empty and might even
    assume that it might be an error.

    --
    Jukka K. Korpela ("Yucca")
    http://www.cs.tut.fi/~jkorpela/
     
    Jukka K. Korpela, Nov 29, 2007
    #15
  16. Jud McCranie

    Jud McCranie Guest

    On Fri, 30 Nov 2007 00:43:23 +0200, "Jukka K. Korpela"
    <> wrote:

    >So it's more or less a hack but it works, mostly.


    It worked for me in IE and Firefox.

    >It's a good idea to consider whether it would be better to insert some
    >other content into the cell, such as "N/A" or "0" or "&ndash;" or
    >whatever constitutes a useful indication or hint. After all, the user
    >might not immediately realize _why_ the cell is empty and might even
    >assume that it might be an error.


    You have a point, but I specifically wanted a blank for "no value" and
    the person I'm writing the program for agreed. The table is a list of
    players at a tournament with their total points. Then there are four
    columns for different tiebreakers. But usually the first tiebreaker
    is decisive and printing all of them has confused people in the past.
    The program shows only the tiebreakers that are relevant and blanks
    for the rest (even though they are calculated).
    --
    Replace you know what by j to email
     
    Jud McCranie, Nov 30, 2007
    #16
  17. Jud McCranie

    DocuMaker Guest

    Sometimes I have to put a blank space in an empty cell to indicate
    that the cell even exists:

    &nbsp;

    ---
    http://www.outsource2documaker.com
    Managing outsourced projects ranging from fine artwork and business
    graphics to website design and maintenance.


    On Nov 27, 10:07 pm, Jud McCranie <>
    wrote:
    > I'm doing cells in a table with
    > <TD align="right">text</TD>
    > When the text is blank, the table isn't displaying correctly in IE and
    > Firefox - the walls of the cell aren't drawn (although they are spaced
    > correctly). I've tried leaving the "text" blank and putting blank
    > characters in there, neither work.
    >
    > How can I get it to draw the walls of the cell if the text is blank?
    > --
    > Replace you know what by j to email
     
    DocuMaker, Dec 3, 2007
    #17
    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. Karsten Wutzke
    Replies:
    9
    Views:
    7,407
    Scott Yanoff
    Oct 31, 2003
  2. Jeff Thies

    "opening" empty table cells

    Jeff Thies, Jun 25, 2004, in forum: HTML
    Replies:
    2
    Views:
    440
    Whitecrest
    Jun 25, 2004
  3. Savvoulidis Iordanis

    Empty gridview cells and checking for empty string

    Savvoulidis Iordanis, Sep 5, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    557
    Savvoulidis Iordanis
    Sep 5, 2008
  4. tshad

    table not displaying correctly

    tshad, Apr 27, 2010, in forum: ASP .Net
    Replies:
    2
    Views:
    427
    tshad
    Apr 28, 2010
  5. John

    Empty Column not displaying correctly

    John, Jan 30, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    138
Loading...

Share This Page