This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on May 5th, 2012  |  syntax: None  |  size: 0.81 KB  |  views: 10  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Style sheet preventing table cellpadding from working
  2. table {
  3.     border-collapse: collapse;
  4. }
  5.  
  6. th, td {
  7.     padding: 0;
  8. }
  9.        
  10. <table cellpadding="10">
  11.   <tr>
  12.     <td padding="10">
  13.       Foo
  14.     </td>
  15.     ...
  16.   ...
  17.   </tr>
  18. </table>
  19.        
  20. <td style="padding: 10px">
  21.        
  22. <table class="table">
  23.   <tr>
  24.     <td>
  25.       Foo
  26.     </td>
  27.     ...
  28.   ...
  29.   </tr>
  30. </table>
  31.        
  32. .table td {
  33.     padding: 10px
  34. }
  35.        
  36. table td {
  37.     padding:10px;
  38. }
  39.        
  40. th, td {
  41.     padding: 0;
  42. }
  43.        
  44. <table style="border-collapse: separate; border-spacing: 10px;">
  45. ...
  46. </table>
  47.        
  48. table#foo {
  49.     border-collapse: separate;
  50.     border-spacing: 10px;
  51. }
  52.        
  53. table {
  54.     border-collapse: collapse;
  55. }
  56.  
  57. th, td {
  58.     padding: 0;
  59. }
  60.  
  61. table.newStyle { padding:10px; }
  62.  
  63.  
  64. <table class="newStyle">
  65.   <tr>
  66.     <td padding="10">
  67.       Foo
  68.     </td>
  69.     ...
  70.   ...
  71.   </tr>
  72. </table>
clone this paste RAW Paste Data