twilitegxa Posted September 21, 2008 Share Posted September 21, 2008 Is it possible to align an entire column in a table to the right without having to individually set a class to each table's cell? There must be a way to name the column and set a class to the column, isn't there? Please tell me if anyone knows a way. Thanks! Quote Link to comment Share on other sites More sharing options...
departedmind Posted September 22, 2008 Share Posted September 22, 2008 .mytable { background-color:#666666;} .mytable td { text-align:right;} You can assign the class mytable to the table and all the td inside that table will be aligned right. Quote Link to comment Share on other sites More sharing options...
F1Fan Posted September 22, 2008 Share Posted September 22, 2008 You can add a global setting like that to ALL <td>'s, or you can add them to all with a certain class. You cannot, however, add an align-right to a whole column without adding each <td> to that class. Quote Link to comment Share on other sites More sharing options...
dropfaith Posted September 22, 2008 Share Posted September 22, 2008 yea classing them is the best way to achieve this unless you want all your tds aligned to the right Quote Link to comment Share on other sites More sharing options...
twilitegxa Posted September 22, 2008 Author Share Posted September 22, 2008 Okay, I was just hoping there was a way to align a whole column rather than assigning a class to each cell I wanted affected. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.