943,754 Members | Top Members by Rank

Ad:
May 17th, 2008
0

Tables & Css

Expand Post »
I am trying to achieve a table like this, using mainly CSS to change the attributes:
http://www.further-flight.co.uk/sample_table.htm

My current effort looks like this:
http://www.further-flight.co.uk/meetups/join_us.php

I would like to remove the white lines within my table, pad the left handside so that the text moves away from the border slightly, add a 2px border between the red cell and the white and have the rows for National Hunt and Mixed in a pale grey colour, while leaving the flat row white. I have attempted these within my code, but haven't got the right result - could someone point me in the right direction, please?

HTML:
HTML and CSS Syntax (Toggle Plain Text)
  1. <table id="sample" cellspacing="2">
  2. <tr class="toprow">
  3. <td colspan="2">North West</td>
  4. </tr>
  5.  
  6. <tr>
  7. <td class="data1">National Hunt</td>
  8. <td class="data1">Aintree, Carlisle, Cartmel</td>
  9. </tr>
  10.  
  11. <tr>
  12. <td class="leftcol">Flat & AW</td>
  13. <td class="data">Chester</td>
  14. </tr>
  15.  
  16.  
  17. <tr>
  18. <td class="data1">Mixed</td>
  19. <td class="data1">Haydock Park</td>
  20. </tr>
  21.  
  22. </table>

CSS:
HTML and CSS Syntax (Toggle Plain Text)
  1. table#sample {
  2. margin-left: 15px;
  3. background-color:#FFFFFF;
  4. border: solid #000 2px;
  5. width: 600px;
  6. }
  7.  
  8. table#sample td {
  9. height: 20px;
  10. }
  11.  
  12. .data1 {
  13. color: #000000;
  14. background-color: #e0e0e0;
  15. text-align: left;
  16. background-color: #FFFFFF;
  17. }
  18.  
  19. .data {
  20. color: #000000;
  21. text-align: left;
  22. background-color: #FFFFFF;
  23. }
  24.  
  25. .toprow {
  26. font-weight: bold;
  27. text-align: left;
  28. background-color: #ec2648;
  29. border-bottom: solid #000 2px;
  30. color: white;
  31. }
  32.  
  33. .leftcol {
  34. font-weight: bold;
  35. text-align: left;
  36. width: 100px;
  37. background-color: #FFFFFF;
  38. }
Similar Threads
Reputation Points: 11
Solved Threads: 1
Light Poster
Borderline is offline Offline
49 posts
since Apr 2008
May 18th, 2008
0

Re: Tables & Css

change table cellspacing="0"
add padding: 5px; to table#sample td
Reputation Points: 11
Solved Threads: 7
Junior Poster in Training
amigura is offline Offline
71 posts
since Jan 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in HTML and CSS Forum Timeline: Open all external links with a frame
Next Thread in HTML and CSS Forum Timeline: Horizontal menus





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC