Robertson Benitez Alfaro Robertson Benitez Alfaro - 1 month ago 14
HTML Question

How To Make This Border Example

<html>
<head>
<link href="Border.css" rel="stylesheet" type="text/css"/>
<title>Border</title>
</head>
<body>
<table border="1">
<tr>
<td rowspan="2">Today's Opinion Poll Question</td>
<td colspan="3">Political party</td>
</tr>
<td>Democrat</td>
<td>Republican</td>
<td>Independent</td>
<tr>
<tr>
<td rowspan="3">Do you favor or oppose increasing the minimum wage?"</td>
<td>Favor</td>
<td>70%</td>
<td>35%</td>
<td>55%</td>
</tr>
<tr>
<td>Oppose</td>
<td>25%</td>
<td>60%</td>
<td>30%</td>
</tr>
<tr>
<td>Unsure</td>
<td>5%</td>
<td>5%</td>
<td>15%</td>
</tr>


I'm trying to make a table that looks exactly like the photo I posted, but I'm having a hard time to get it right and I dont know why. Can someone please explain to me how you make this border in detail? I have a hard time putting Favor, Oppose, and Unsure correctly can someone explain to me what I'm doing wrong? Thank you. border example

Answer

The only thing that seems to be missing is expanding the "Today's Opinion Poll Question" over 2 columns. Add colspan="2" attribute to that cell ie:

<td rowspan="2" colspan="2">Today's Opinion Poll Question</td>