This is something that I have never had to use becuase I hardly ever use tables until now (i use
CSS so never needed to use a table before)
I am trying to have a table which is 80% wide.
In it i have 2 columns but i want the first column to be to be about 75% and the other column to be about 25%.....I have tried using this but the table screws up and looks rubbish.
I did think about setting the td width to 25% and using a colspan of 3 for the first column and colspan of 1 for the other column but that didn't work either.
Has anybody got any idea how I could do this
Here is the
css
- Code: Select all
.openinghours {
border: 4px solid #CCCCCC;
border-collapse: collapse;
margin: auto;
}
.openinghours td {
font: 9pt Verdana, Geneva, Arial, Helvetica, sans-serif;
width: 25%;
border: 1px solid #CCCCCC;
text-align: left;
padding: 4px;
}
.openinghours th {
border: 1px solid #828282;
color: #4E6BB1;
background-color: #D6DDE6;
font: bold 100% Verdana, Geneva, Arial, Helvetica, sans-serif;
text-align: center;
padding: 4px;
}
Here is the
HTML
- Code: Select all
<table class="openinghours" width="80%">
<tr>
<th colspan="4">Admission Rates</th>
</tr>
<tr>
<td colspan="3">General Admission</td>
<td> </td>
<td> </td>
<td>£3.50</td>
</tr>
<tr>
<td colspan="3">Senior Citizens</td>
<td> </td>
<td> </td>
<td>£2.50</td>
</tr>
<tr>
<td colspan="3">Children Under 3</td>
<td>Free</td>
</tr>
<tr>
<th colspan="4">Group Rates</th>
</tr>
<tr>
<td colspan="3">Civic groups, nonprofits, and groups of 20 or more with advanced reservations. Group tour leaders please call for rate information.</td>
<td>£2.00</td>
</tr>
</table>