luby wrote: >> I have a problem for the style font-famliy of textarea .
As usual, a URL would have been most useful. It would have let us access the page as it is, as opposite to e.g. GB2312 encoded copy of a snippet thereof. (My e-mail program shows straight Ascii quotation marks " as curly when GB2312 encoding is used, causing the natural but wrong reaction "oh, but curly quotes don't work in CSS.) >> The code is as follows: >> <span style="font-size: 18pt; font-family: 'Centaur';"> >> Hello word! >> <textarea style="font-family:inherit;font-size:inhert;">textarea css >> style! </textarea> >> </span> The seconf occurrence of the keyword inherit is misspelled. It is impossible to know whether this was an error in copying from the actual page to your e-mail message... but it does not really affect the issue of font-family. >> But I found the textarea's css style can't be/ /inflect.If i want to >> the textarea's css >> //style is the same as the its parent element's .what can i do . I guess you mean that the font-family value is not inherited. The next question is then: On which browser(s)? IE is notorious for lack of support for several CSS features, including explicit inheritance, i.e. the use of the keyword inherit as a property value. So there is no general way to make an element take it parent element's value for some property. The workaround is to set the value explicitly, e.g. span, textarea { font-family: 'Centaur'; } This does not guarantee that the same value is used for both elements, since some other CSS rule might set font-family for span or textarea. But we can normally expect that a page ("author") style sheet setting wins any setting in a browser or user style sheet Jukka ______________________________________________________________________ css-discuss [cs...@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/