How to get empty cell in tables?

  • Author
    Posts
  • #685511

    heatherstark
    Member

    I am diving into html for tables (not by choice) as there is not Graphical Editor for them, and have run into the following glitch.

    I understand (via googling the topic) that the way to get an empty cell is to use a nonbreaking space character inside the td tags, which is inserted by inputting in direct sequence
    ampersand n b s p semicolon

    This works fine when I test it in w3schools site. But when I do this in wordpress when I put that character sequence in, I get the literal character string showing up in the table cells. How can I force it to be interpreted?

    Or, alternatively, what other trick do I need to use to get a blank cell in my table?

    I’m sure lots of people have solved this already. Any tips?

    ta!

    #685619

    The

     

    has to be entered into the “td” cell code in the HTML editor such as below, not into the visual editor.

    <td>&nbsp;</td>

    If that doesn’t work, just put a period into the cell as a placeholder.

    #685628

    heatherstark
    Member

    Thanks for the tip.

    That’s what I was doing – and it doesn’t work. Does it work for you?

    I’ve worked around it temporarily by changing the design of the table….

    #685630

    wpgaurav
    Member

    Are you missing something? <table border="1">
    <tr>
    <td>Table cell 1</td><td> </td><td>Table cell 3 if you want</td>
    </tr>
    <tr><td>Another row cell 1</td><td>row2 cell2</td><td> </td>
    </tr>
    </table>

    Note: In Vigilance, the theme you’re using: border is very dim, that’s why I have used border=”1″.

    #685631

    wpgaurav
    Member

    oops!   converted into a space. Re-written:
    <table border="1">
    <tr>
    <td>Table cell 1</td><td> </
    td><td>Table cell 3 if you want</
    td>
    </tr>
    <tr><td>Another row cell 1</
    td><td>row2 cell2</td> <td> </
    td>
    </tr>
    </table>

    #685632

    wpgaurav
    Member

    Hi TSP! How to write & n b s p ;? I tried & a m p ; n b s p ; (w/o spaces), but it didn’t work.

    #685633

    airodyssey
    Member

    In the old days of hard HTML coding, I would use a 1 x 1 px transparent GIF image that I would insert wherever I needed to add extra space between things or create an empty table cell. You could try that if the &nbsp; solution does not work.

    #685634

    airodyssey
    Member

    And to answer wpgaurav’s question. This is the code I use to show a & sign followed by “nbsp”:
    <strong>&</strong>nbsp;

    #685721

    timethief
    Member

    ~~airodyssey
    Me too. :)

    #685784

    wpgaurav
    Member

    &nbsp; Thanks @airodyssey [if it worked].

The topic ‘How to get empty cell in tables?’ is closed to new replies.