Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to convert conventional html tables into divs

Status
Not open for further replies.

sunw

Technical User
Sep 24, 2007
32
US
Experts,

I am new to dhtml/css. I have a page which contains a table somewhat like this:

Code:
<table border='1' width='90%'>
<tr> [COLOR=red]<th rowspan=2 colspan=2>Item Name</th><th colspan=5>Check all that apply</th>[/color]</tr>
<tr>
<td width='10%' align='center'>Box 1</td>
<td width='10%' align='center'>Box 2</td>
<td width='10%' align='center'>Box 3</td>
<td width='10%' align='center'>Box 4</td>
<td width='10%' align='center'>Box 5</td>
</tr>
<tr>
<td align='right' width='20%'>1. Type Something: </td>
<td align='left' width='30'><input name='in1' id='in1ID' size='35%' type='text'></td>
<td width='10%' align='center'><input type='checkbox' name='chk11' id='chk11'></td>
<td width='10%' align='center'><input type='checkbox' name='chk12' id='chk12'></td>
<td width='10%' align='center'><input type='checkbox' name='chk13' id='chk13'></td>
<td width='10%' align='center'><input type='checkbox' name='chk14' id='chk14'></td>
<td width='10%' align='center'><input type='checkbox' name='chk15' id='chk15'></td>
</tr>
</table>

I know how to use <div> to define a row and how to define the width of a row using css. But I don't know how to convert colspan/rowspan into div.

I highly appreciate your advice and help.
 
Table cells/rows and divs are not interchangeable.

They have a different semantic meaning which is what you should be looking at.


--
Tek-Tips Forums is Member Supported. Click Here to donate

<honk>*:O)</honk>

Tyres: Mine's a pint of the black stuff.
Mike: You can't drink a pint of Bovril.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top