How do I do this using a table

This is a discussion on "How do I do this using a table" within the Web Page Design section. This forum, and the thread "How do I do this using a table are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Apr 14th, 2007, 22:15
AdRock's Avatar
SuperMember

SuperMember
Join Date: Jul 2006
Location: Devon, England
Posts: 565
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to AdRock
How do I do this using a table

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>&nbsp;</td>
  <td>&nbsp;</td>
  <td>£3.50</td>
     </tr>
     <tr>
  <td colspan="3">Senior Citizens</td>
  <td>&nbsp;</td>
  <td>&nbsp;</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>
Reply With Quote

  #2 (permalink)  
Old Apr 14th, 2007, 22:30
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How do I do this using a table

This doesn't really look like table material to me... Why are you using them?
Reply With Quote
  #3 (permalink)  
Old Apr 14th, 2007, 23:23
SuperMember

SuperMember
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How do I do this using a table

Code: Select all
<table width="80%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="75%">&nbsp;</td>
    <td width="25%">&nbsp;</td>
  </tr>
  <tr>
    <td width="75%">&nbsp;</td>
    <td width="25%">&nbsp;</td>
  </tr>
  <tr>
    <td width="75%">&nbsp;</td>
    <td width="25%">&nbsp;</td>
  </tr>
  <tr>
    <td width="75%">&nbsp;</td>
    <td width="25%">&nbsp;</td>
  </tr>
</table>
Here is a basic 2 column table that has four rows.

If you need something else let me know!
Reply With Quote
Reply

Tags
table

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Am I using table-cell and table-row too much? idl Web Page Design 15 Sep 7th, 2006 12:55
Need to align width of Float table with the table below Vertabase Web Page Design 4 Mar 8th, 2006 21:21
Need table help! mgcom Web Page Design 6 Jan 8th, 2006 21:50
How do I do in the table accessman Databases 1 Oct 15th, 2005 00:57
..copy data from column A in Table A to column B in Table B? gecastill Databases 10 Jun 23rd, 2005 18:27


All times are GMT. The time now is 03:37.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43