title: How to apply style classes to td elements?
body: <p>What I am trying to find out is the proper syntax to apply some style to each individual <code>td</code> in my table below:</p>
  <pre class="lang-html prettyprint-override"><code>&lt;section id=&quot;shows&quot;&gt;
  &lt;!-- HTML5 section tag for the shows 'section' --&gt;
  
  &lt;h2 class=&quot;gig&quot;&gt;Shows&lt;/h2&gt;
  
  &lt;ul class=&quot;gig&quot;&gt;
  
      &lt;!-- Start the table --&gt;
      &lt;table&gt;
          &lt;tr&gt;
              &lt;!-- Setup the header row --&gt;
              &lt;th&gt;When&lt;/th&gt;
              &lt;th&gt;Where&lt;/th&gt;
              &lt;th&gt;Start&lt;/th&gt;
              &lt;th&gt;Finish&lt;/th&gt;
          &lt;/tr&gt;
  
          &lt;?php
              // some PHP to fetch all the gig entries from the shows table
              $shows_query = &quot;SELECT * FROM shows ORDER BY date ASC&quot;;
              $shows = mysql_query($shows_query);
              // a loop to place all the values in the appropriate table cells
              while ($show = mysql_fetch_array($shows)){
              //begin the loop...
              ?&gt;
  
          &lt;!-- Start the row --&gt;
          &lt;tr&gt;
  
              &lt;!-- Format the date value from the database and print it: --&gt;
              &lt;td class=&quot;when&quot;&gt;&lt;?php 
              $date = date(&quot;l, F j, Y&quot;, strtotime($show['date'])); 
              echo &quot;$date&quot;;
              ?&gt;&lt;/td&gt;
  
              &lt;td class=&quot;venue&quot;&gt;&lt;?php
              echo $show['venue'];
              ?&gt;&lt;/td&gt;
  
              &lt;!-- Format the start and end times and print them: --&gt;
              &lt;td class=&quot;start&quot;&gt;&lt;?php
              $time = date(&quot;G:i&quot;, strtotime($show['time'])); 
              echo &quot;$time&quot;;
              ?&gt;&lt;/td&gt;
  
              &lt;td class=&quot;finish&quot;&gt;&lt;?php
              $until = date(&quot;G:i&quot;, strtotime($show['until']));
              echo &quot;$until&quot;;
              ?&gt;&lt;/td&gt;
  
              &lt;!-- Finish this row --&gt;
          &lt;/tr&gt;
  
          &lt;!-- Some space before the next row --&gt;
          &lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;
  
          &lt;?php 
              // close the loop:
               }
               ?&gt;
          &lt;!-- Finish the table --&gt;
      &lt;/table&gt;
  &lt;/ul&gt;
  
  &lt;/section&gt;
  </code></pre>
  <p>The styling that I have at the moment is:</p>
  <pre class="lang-css prettyprint-override"><code>#shows table.gig { font-size: 25px; }
  #shows td.finish { margin-left: 50px;}
  </code></pre>
  <p>I did have a class for the table itself but not sure if it's necessary.</p>
  <p>The font-size works but what I can't figure out is how to apply the style to the <code>td</code>, <code>th</code>, <code>tr</code> elements etc. I have tried several things but can't seem to get it to work!</p>