I'm not very familiar with HTML, so excuse me if this is something simple, but I couldn't figure it out from googling. Anyway, the problem i'm having can be illustrated by this:
<html>
<body>
<table border="1">
<tr>
<td>lots of words blah blah</td>
</tr>
<tr>
<td>word</td>
<td>word</td>
<td>word</td>
</tr>
</table>
</body>
</html>
Is there a way that rather then have the first column be stretched, that just that first cell gets bigger? Theres only one cell in the first row, so theres alot of empty space. I'd like the cell to expand to fit the row, but instead it either stretches the whole column, or stretches vertically. How do I get around this?
Use the colspan attribute to tell it to cover multiple columns, so in your case the td
on your first row would be <td colspan="3">
Set colspan="3"
on the first <td>
element.
Like this: <td colspan="3">
.
The colspan value is how many columns do you want it to take up.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With