Sent by Adam Kuehn on 22 March 2004 15:03
[EMAIL-REMOVED] wrote:
>I'm working on a table and I have all the td's styled, however
>within a td, I want the two different words to have different
>styles. Eg: one word to be italic and one bold etc. How can I
>accomplish this. I tried doing it like this, but it didn't work:
>
><td id="dates">July 14-31 <span class="italic">(window)</span></td>
I see two possible problems, based on the limited information you
provided. If you have assigned the td a font-weight (e.g. bold),
that value will be inherited by the span. You would need to
explicitly cancel out that style in the styles you assign to the
span, since that is a different property from font-style.
Second, if you are using the shorthand property on the span in a
different declaration, make sure your selector is sufficiently
specific to "win" in the cascade. For instance, assume you have your
styles written this way:
td#dates span {font: 1em sans-serif}
td span.class {font-style: italic}
The first selector uses the shorthand, which includes a default
font-style of normal. It is more specific than the second selector,
so the text will still be normal.
It is hard to know what your particular problem is, though, without
seeing at least the CSS you have in play. Also, as another poster
has mentioned, consider adjusting your markup for semantics.
-Adam Kuehn
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/