Archive for the ‘XHTML Development’ Category

Styling Table Columns with CSS

I always struggled to find a nice, clean way to style columns in tables with CSS; mainly I wanted to make the left column’s text align to the right, and the right column’s text align to the left. I knew I could create classes and just paste that class into every td – but that gets bulky… and I’d rather not have to put a bunch of class=”align-left” into a zillion td tags, etc. I prefer to write my CSS in a semi-conditional way (I presume this is my scripting side coming into play) so that it’ll style based on the tags and their placement/usage instead of classes (where applicable of course). I can show you how I managed to accomplish this and the benefits, and downsides, to my method. Continue Reading