Skip to content

Problems with formatting tables

February 29, 2012

So this particular week’s Part III assignment has been a bit…problematic for me. I don’t know if anyone else is having issues with some of the formatting for the table, but it was driving me nuts. For the life of me I could not figure out why my text-style, color, padding, etc. elements were not showing up in the various columns in the table. I found out that a <col> element is very limited in what formatting you can do (see Castro pg. 247 Tip 1–thanks Derek for pointing that out!). Only background, border, width, and visibility properties can be applies to <col> elements, including any classes for <col> elements. So all the properties I had tried to define were not being applied because they can’t apply to those elements. I offer two solutions that seem to work for fixing your formatting:

1) Give each of your cells in each column the same class, for example using class=”bktitle” for all the cells in the title column, class=”athr” for cells in the author column, etc. Then, apply the properties you wish to format for each of these classes. (I’ve tried this one myself successfully.)


2) Settle for table-wide formatting and set properties and values for the whole table.

No comments yet

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: