Forum Moderators: not2easy

Message Too Old, No Replies

Styles not being applied

         

rpeters74

1:28 pm on Nov 11, 2003 (gmt 0)



I have a CSS that looks like this:
--

Table
{
font: 10pt Arial, Verdana, Helvetica, sans-serif;
}
TR
{
font: 10pt Arial, Verdana, Helvetica, sans-serif;
}
TD
{
font: 10pt Arial, Verdana, Helvetica, sans-serif;
}
.boldText
{
font: bold 10pt Arial, Verdana, Helvetica, sans-serif;
}

--
When I set the class of a web element to "boldText" within a <table> or <tr> or <td> the text is not bolded (the Table/TR/TD style definitions overwrite the boldText class I think). How does one get around this?

Thanks

RP

Paul in South Africa

1:50 pm on Nov 11, 2003 (gmt 0)

10+ Year Member



Try

.boldText
{
font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 10pt; font-weight: bold;
}

in your CSS

divaone

1:52 pm on Nov 11, 2003 (gmt 0)

10+ Year Member



not sure if this is the answer or not, but have you tried expanding the font tag:

.boldText
{
font-family:arial,verdana,etc..;font-size:10pt;font-weight:bold;
}

how are you calling this style? you can use:

<span class="boldText">text here</span>

as an aside, you can save a few bytes in your css by combining your styles:

table.td {font:list styles here...;}
(eliminate the rest)

again, not sure if this solves your problem but hth :o)

DaScribbler

4:32 pm on Nov 11, 2003 (gmt 0)

10+ Year Member



make it even simpler and just use...

.boldText
{
font-weight: bold;
}

The font is already declared in the table selector, and will be inherited.