Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6939265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:36:02+00:00 2026-05-27T12:36:02+00:00

I have a table with various rows that display data, in each row I

  • 0

I have a table with various rows that display data,
in each row I have a column with a cell for the label and a column a cell for the data.
Sometimes there may be several columns on the same row, however when I try to get a row underneath a row with 3 or more columns to only have 2 columns and for the second (data) column to span the remaining columns, colspan doesn’t seem to work.

It does work with the first column of the row but not subsequent columns.

I have tried to create a table inside the first column which works but then my label column is all out of alignment and I do not wish to manually adjust the size of the cell to try and make it align as this seems messy and will need constant attention should the label cells in the rows above or below change width… if you get what I mean.

I am not sure if this is even possible or if there is some sort of magic trick you need to do to get it to work.

Any help would be gratefully appreciated and below is a sample of what I am trying to do.

       <table cellpadding="0px" cellspacing="0px">
           <tr>
               <td>
                   My first label column
               </td>
               <td>
                   My first column data
               </td>
               <td>
                   My second label column
               </td>
               <td>
                   My second column data
               </td>
           </tr>
           <tr>
               <td>
                   My second row first column label
               </td>
               <td colspan="3">
                   My second row second column long data................................
               </td>
           </tr>
       </table>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T12:36:03+00:00Added an answer on May 27, 2026 at 12:36 pm

    No magic is needed. The code in your example works as intended. You need to post examples of situations where you think the idea does not work (and describe how it seems to fail). They may have some markup errors or other issues. In particular, each table row should have the same number of cells, when a cell with colspan=”n” is counted as n cells.

    As an aside, technically, “0px” is not allowed as cellspacing or cellpadding value; use plain “0” instead. But browsers actually interpret “0px” as “0”, so this does not cause problems in practice.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am importing massive amounts of data from Excel that have various table layouts.
I have a table that stores various clients I have done work for, separated
In an embedded application, we have a table describing the various address ranges that
I have a MySQL table that holds many entries with repeated IDs (for various
I am trying to display every odd instance of a table row, however there
I have a table that contains in one column a variable length delimited string
I have a DataTable with column Value and column Name that has 30000 rows.
I have a table that displays a column of test names, with several (unlimited
I have an a table Azure Table Storage where the various rows have a
I have a small 20-row table in my SQL08-R2 database that has an nvarchar(max)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.