SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Jul 2010
    Location
    Bangalore
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Merging table cells in HTML

    Hi All,

    I have the following HTML:
    <html>
    <body>
    <table border="1">
    <tr>
    <td>row 1, cell 1</td>
    <td>row 1, cell 2</td>
    </tr>
    <tr morerows = "1">
    <td>row 2, cell 2</td>
    </tr>
    </table>
    </body>
    </html>

    When I open the HTML in IE I see the table in the following format:

    row 1, cell 1 row 1, cell 2
    row 2, cell 2

    But actually I need the table in the following format:

    row 1, cell 1 row 1, cell 2
    -------------row 2, cell 2

    Please provide your inputs.

  2. #2
    SitePoint Evangelist
    Join Date
    Jun 2007
    Location
    North Yorkshire, UK
    Posts
    483
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    morerows is not a valid attribute. Just put an empty (or at least one with a non breaking space) cell in.

    Code HTML4Strict:
    <html>
    <body>
    <table border="1">
    <tr>
       <td>row 1, cell 1</td>
       <td>row 1, cell 2</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>row 2, cell 2</td>
    </tr>
    </table> 
    </body>
    </html>


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •