Tables & Css

Reply

Join Date: Apr 2008
Posts: 41
Reputation: Borderline is an unknown quantity at this point 
Solved Threads: 1
Borderline Borderline is offline Offline
Light Poster

Tables & Css

 
0
  #1
May 17th, 2008
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. }
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 71
Reputation: amigura is an unknown quantity at this point 
Solved Threads: 7
amigura's Avatar
amigura amigura is offline Offline
Junior Poster in Training

Re: Tables & Css

 
0
  #2
May 18th, 2008
change table cellspacing="0"
add padding: 5px; to table#sample td
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the HTML and CSS Forum


Views: 579 | Replies: 1
Thread Tools Search this Thread



Tag cloud for HTML and CSS
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC