Jump to content

How to change the font of only one column in a table


rassul

Recommended Posts

I have the following table. I need to change the font for the 'Population' column only so the numbers are lined up. How is it done in CSS so I don't have to do it row by row? Thanks in advance.

<!DOCTYPE html><html><head>  <meta charset="utf-8">  <title></title>	    <style type="text/css" media="screen">			    tr:nth-of-type(2n+3)  { background-color: #C0C0C0 ;  }	    </style></head><body>    <div id="container">	    <table border="1" align="center" bgcolor="white">			    <th>Country</th>			    <th>Capital</th>			    <th>Population</th>		    </tr>		    <tr>			    <td>Algeria</td>			    <td>Algiers</td>			    <td>35,980,193</td>		    </tr>		    <tr>			    <td>Belgium</td>			    <td>Brussels</td>			    <td>11,008,0000</td>		    </tr>		    <tr>			    <td>Chad</td>			    <td>N'Djamena</td>			    <td>11,525,496</td>		    </tr>		    <tr>			    <td>Chad</td>			    <td>N'Djamena</td>			    <td>11,525,496</td>		    </tr>	    </table>    </div></body></html>

Link to comment
Share on other sites

Never seen that before dsonesuk, thanks very much. Do you have any good CSS sites I could learn CSS3 psuedo classes from? Kind regards, Lab.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...