...

View Full Version : how to join two fields of a table



eydg
11-24-2012, 09:25 PM
a simple case - no doubt, but i am in no way able to make the bottom two fields one.

other than replace them with another embedded table, but it is not elegant.

please help


<table">
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>

LearningCoder
11-24-2012, 09:40 PM
You can use the colspan attribute on ONE of the <td> elements, like so:



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Title here</title>
<style type="text/css">

table {border: 1px solid black;}

td {border: 1px solid black;}

</style>

</head>
<body>


<table>
<tr>
<td>a</td>
<td>b</td>
</tr>
<tr>
<td colspan="2">c d</td>
</tr>
</table>

</body>
</html>


Regards,

LC.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum