Link to home
Start Free TrialLog in
Avatar of LuckyLucks
LuckyLucks

asked on

spanning a data cell w/o headers

Hi EEE:
Given an array of column name, array of column values and an array of comments, i would like
to display in an HTNL page in the following way:

-----------------------------------------------------
ColumnName1 | ColumnName2 | ColumnName3 | ColumnName4        
-----------------------------------------------------
columnvalue1a| columnValue2a|columnvalue3a | columnvalue4a
-----------------------------------------------------
      1. comment1a
        2. comment2a
-----------------------------------------------------
columnvalue1b| columnValue2b|columnvalue3b | columnvalue4b
-----------------------------------------------------
      1. comment1b
        2. comment2b

My implementation looks like
<table>
<tr><td>ColumnName1</td><td>ColumnName2</td><td>ColumnName3</td><td>ColumnName4</td>
<tr><td>ColumnValue1a</td><td>ColumnValue2a</td><td>ColumnValue3a</td><td>ColumnValue4a</td>
<tr><td><ol> <li>comment1a</li> <li>comment2a</li> </ol></td></tr>
 
So, far I am having difficulty in the following subsections
1. The third part shows the numbered list of comments but its width is restricted to the column1's width. How can I get it to span all the columns?

2. How can I set the width of the table to 2 rows and rest of the row wraps around, like so?

-----------------------------------------------------
ColumnName1 | ColumnName2 |
ColumnName3 | ColumnName4        
-----------------------------------------------------
columnvalue1a| columnValue2a|
columnvalue3a | columnvalue4a
-----------------------------------------------------
ASKER CERTIFIED SOLUTION
Avatar of Jason Minton
Jason Minton
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
In your example above it looks like you need:
<tr><td colspan="4"><ol> <li>comment1a</li> <li>comment2a</li> </ol></td></tr>
btw, for readability you should write it like:
<table>
   <tr>
      <td>
         ColumnName1
      </td>
      <td>
         ColumnName2
      </td>
      <td>
         ColumnName3
      </td>
      <td>
         ColumnName4
      </td>
   <tr>
      <td>
         ColumnValue1a
      </td>
      <td>
         ColumnValue2a
      </td>
      <td>
         ColumnValue3a
      </td>
      <td>
         ColumnValue4a
      </td>
   <tr>
      <td>
         <ol>
            <li>comment1a</li>
            <li>comment2a</li>
         </ol>
      </td>
   </tr>
</table>