...

View Full Version : How do i stop a table cell inheriting the css body attributes



jamesgrayking
11-03-2009, 07:03 PM
I have designed a website in drupal and for the most part it has gone well. I have been asked to make the font on every page aside from the front bigger now however. On the front I have a separate css rule:


.fronttable {
border:0px;
font-family: verdana, Helvetica, sans-serif;
font-size: 1.0em;
text-align: left;
color: #133c63;
line-height:normal;
font-weight:normal;
margin-bottom:10px;
padding-bottom:9px;
}

that is referenced by


class="fronttable"

in the table cell (i do not want it affecting every cell)

However, when i then change the body size the table cell also changes. According to firebug it is picking up some of my table style, but inheriting other parts, namely size, from the body class. Does anybody know how to stop this from happening? the site is at www.fidelitypayment.com

Thanks so much!

seco
11-03-2009, 07:30 PM
yes, use div's. tables are definant.

jamesgrayking
11-03-2009, 07:49 PM
that worked a charm, thanks so much!!

rnd me
11-03-2009, 10:05 PM
reset your cells:


.fronttable td {font-size: 14pt; color:black;}

Arbitrator
11-04-2009, 12:33 AM
However, when i then change the body size the table cell also changes. According to firebug it is picking up some of my table style, but inheriting other parts, namely size, from the body class. Does anybody know how to stop this from happening?em is a relative unit based on the font size of the parent element. Unless you had a static font size declared on an element between the body and td elements, naturally, any change in size on the body element would cause a proportional change in size of the td element.

rnd me
11-04-2009, 06:41 AM
the cascading is less understood than the styling...



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum