Jump to content

Setting styles for table columns


elementalgrace

Recommended Posts

Hello,I am trying to set out some styles for a table (for displaying tabular data) and want to have certain columns aligned to the left or the right i.e. I want columns that deal with cost to be displayed right-aligned as they should be and the remainder to be left aligned. I thought I could get this to work with the entire column by styling the col declaration rather than having to apply a class to every individual table cell in that column. Does anyone know if this would be possible or if there are any tutorials that cover this?Thanks in advance. :)

Link to comment
Share on other sites

There are some tutorials, but I forget where. :) But I do know this: table columns have limited styling ability in most implementations. Background-color is always reliable, but I don't remember about text-alignment. It might not be. Yes, a gaping hole in the system.I'd recommend the thing you're avoiding, which is to add a class to each table cell based on its position in the row.

Link to comment
Share on other sites

There are some tutorials, but I forget where. :) But I do know this: table columns have limited styling ability in most implementations. Background-color is always reliable, but I don't remember about text-alignment. It might not be. Yes, a gaping hole in the system.I'd recommend the thing you're avoiding, which is to add a class to each table cell based on its position in the row.
I seem to be having limited luck with the text-alignment. I think you might be right and I'll have to stick with classes for each cell in the column. What a shame.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...