I am pulling out my hair.

I am trying to theme a Views Table using CSS -- all I want to do is change the size of the font.

I have followed this to the letter: http://drupal.org/node/154087

No matter what changes I make to my style.css, nothing seems to happen when I refresh my view.

Can anyone offer any pointers?

Comments

zbricoleur’s picture

Which element are you trying to apply the change to? There may be another element further down the cascade that is overriding your changes. E.g., you may be applying your style to table, but there is some other rule (in some other stylesheet that is loading) that applies to td and thus overrides yours.

Can you show us some HTML from the page you're trying to change, and the CSS that you are applying to it?

audleman’s picture

Install the Firefox plug-in Firebug. It let's you inspect an element on your page, and shows you all of the style affecting it. If a style further down the cascade is overwriting yours, Firebug will show it.

Kevin

Village Idiot’s picture

If I add the style at the bottom of the style.css file, shouldn't that ensure it is reflected in the design?

zbricoleur’s picture

Not necessarily. That is only one aspect of the "cascade" in CSS.

Suppose you have this style sheet:

td {font-size: 10px; }
table { font-size: 20px; }

What size do you think the text will be in the table? It will be 10px, because the td rule gets applied after the table rule, even though it comes first in the stylesheet, because in the DOM the td is further down the tree. So you need to make sure that, for example, you are not trying to apply your changes at the table level only to have them undone at the td level.

Have a look in system.css to see some of the styles that get applied there to th, tr, etc. I think you will see that system.css is still effectively styling your tables.