I'm making a simple website, but is there a way to keep the width of different columns separate? What would I need to switch around or change?
<table>
<tr><td width="50%">Site logo</td>
<td width="50%">Navigation</td></tr>
<tr><td width="100%">Art Examples</td></tr>
<tr><td width="60%">News</td>
<td width="40%">About Me</td></tr>
<tr><td width="100%">Other websites</td></tr>
<tr><td width="100%">Copyright</td></tr>
</table>
I'm such a newbie to HTML and 开发者_如何学Cdespite having a book right in front of me, I'm still confused about this part.
You need a colspan="2"
on the <td>
tags where you only want one <td>
per row.
Like this:
<table>
<tr><td width="50%">Site logo</td>
<td width="50%">Navigation</td></tr>
<tr><td colspan="2">Art Examples</td></tr>
<tr><td width="60%">News</td>
<td width="40%">About Me</td></tr>
<tr><td colspan="2">Other websites</td></tr>
<tr><td colspan="2">Copyright</td></tr>
</table>
精彩评论