Sunday, April 4, 2010

CSS: force text style inheritance from...

Hi all



By any chance, is there a way to force text within table
cells to inherit the font style from the

div that contains the table?



I tried

div td{font-family:inherit;}



and it does not work.



Is this possible at all?



--

seb ( ---@webtrans1.com)


http://webtrans1.com | high-end web
design



An Ingenious WebSite Builder:
http://sitelander.com

CSS: force text style inheritance from...
%26lt;div style=''font-weight:bold;font-family:Tahoma, Geneva,
sans-serif;''%26gt;

%26lt;table%26gt;

%26lt;tr%26gt;

%26lt;td%26gt;This will be bold and will be Tahoma, Geneva,

sans-serif%26lt;/td%26gt;

%26lt;/tr%26gt;

%26lt;/table%26gt;

%26lt;/div%26gt;





--

Murray --- ICQ 71997575

Adobe Community Expert

(If you *MUST* email me, don't LAUGH when you do so!)

==================


http://www.projectseven.com/go
- DW FAQs, Tutorials %26amp; Resources


http://www.dwfaq.com - DW FAQs,
Tutorials %26amp; Resources

==================





''(_seb_)'' %26lt;seb@webtrans1.com%26gt; wrote in message

news:fgcto2$fse$1@forums.macromedia.com...

%26gt; Hi all

%26gt;

%26gt; By any chance, is there a way to force text within table
cells to inherit

%26gt; the font style from the div that contains the table?

%26gt;

%26gt; I tried

%26gt; div td{font-family:inherit;}

%26gt;

%26gt; and it does not work.

%26gt;

%26gt; Is this possible at all?

%26gt;

%26gt; --

%26gt; seb ( ---@webtrans1.com)

%26gt;
http://webtrans1.com | high-end web
design

%26gt;

%26gt; An Ingenious WebSite Builder:
http://sitelander.com



CSS: force text style inheritance from...
Murray *ACE* wrote:

%26gt; %26lt;div style=''font-weight:bold;font-family:Tahoma,
Geneva, sans-serif;''%26gt;

%26gt; %26lt;table%26gt;

%26gt; %26lt;tr%26gt;

%26gt; %26lt;td%26gt;This will be bold and will be Tahoma, Geneva,

%26gt; sans-serif%26lt;/td%26gt;

%26gt; %26lt;/tr%26gt;

%26gt; %26lt;/table%26gt;

%26gt; %26lt;/div%26gt;

%26gt;

%26gt;



oh sorry... something else caused my text to loose its style
and I thought for a minute that text

within cells did not inherit from div containers.

my bad



--

seb ( ---@webtrans1.com)


http://webtrans1.com | high-end web
design



An Ingenious WebSite Builder:
http://sitelander.com


.oO((_seb_))



%26gt;oh sorry... something else caused my text to loose its
style



The DOM Inspector in Firefox can be really helpful to find
such errors

and the rule that was responsible for the unexpected result.



%26gt;and I

%26gt;thought for a minute that text

%26gt;within cells did not inherit from div containers.



In some browsers there were issues with inheritance into a
table when

the page was rendered in quirks mode.



Micha

No comments:

Post a Comment