This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Stylesheets > April 2007 > Cross browser way to inherit?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Cross browser way to inherit?
laredotornado@zipmail.com

2007-04-23, 6:16 pm

Hi,

I've discovered on both IE and Firefox, this is not working ...

..tabText {
color: inherit;
font-family: Tahoma;
font-size: 11px;
font-weight: bold;
}

with regards to inheriting color. Here is the HTML in which this is
found:

<td class="topTab tabSelected" style="padding-left:5px; padding-
right:5px;">
<table><tr>
<td class="tabText" id="tab1">General</td>
<td class="closeTab"><img src="images/close.gif" alt="Close"
border="0"></td>
</tr></table>
</td>

Any ways to write the CSS class so that it inherits?

Thanks, - Dave

John Hosking

2007-04-23, 6:16 pm

laredotornado@zipmail.com wrote:

> I've discovered on both IE and Firefox, this is not working ...
>
> .tabText {
> color: inherit;
> font-family: Tahoma;
> font-size: 11px;
> font-weight: bold;
> }
>
> with regards to inheriting color. Here is the HTML in which this is
> found:


Where's the rest?

> <td class="topTab tabSelected" style="padding-left:5px; padding-right:5px;">
> <table><tr>
> <td class="tabText" id="tab1">General</td>
> <td class="closeTab"><img src="images/close.gif" alt="Close"
> border="0"></td>
> </tr></table>
> </td>
>
> Any ways to write the CSS class so that it inherits?


What's the color styling on #tab1? Where are the rules for .topTab and
..tabSelected? Show us the CSS. Provide a URL to validated code.

--
John
Andy Dingley

2007-04-23, 6:16 pm

On 23 Apr, 17:20, "laredotorn...@zipmail.com"
<laredotorn...@zipmail.com> wrote:

> I've discovered on both IE and Firefox, this is not working ...


Use a complete page, not a fragment

Put it on a public web server somewhere,

Tell us the URL.

Bergamot

2007-04-23, 6:16 pm

laredotornado@zipmail.com wrote:
>
> I've discovered on both IE and Firefox, this is not working ...
>
> color: inherit;


Color is inherited by default, so why are you setting it in the first place?

--
Berg
Jukka K. Korpela

2007-04-23, 6:16 pm

Scripsit laredotornado@zipmail.com:

> I've discovered on both IE and Firefox, this is not working ...
>
> .tabText {
> color: inherit;
> font-family: Tahoma;
> font-size: 11px;
> font-weight: bold;
> }
>
> with regards to inheriting color.


It also works poorly with regard to the things that "work". Setting text to
11 pixels bold Tahoma is a horrendous choice and should be reserved for
usage in torture.

Others have asked you to post the URL. My suggestion is that you rewrite the
page from scratch after learning some basic authoring principles from a good
book. That's probably much faster than trying to fix the mess, even with
help from the public.

Regarding the value inherit, it is not supported by IE, and you wouldn't
need it anyway, because in almost all cases you could set the color to a
specific value or let it be inherited by default.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews