Microsoft KB Archive/232548

= WD2000: Web Page Doesn't Show Style Based on Cascading Style Sheet =

Article ID: 232548

Article Last Modified on 12/6/2000

-

APPLIES TO


 * Microsoft Word 2000 Standard Edition

-



This article was previously published under Q232548



SYMPTOMS
When you view a Web page, text formatted with particular styles may not appear as you intended, even though you have a cascading style sheet linked to the Web page.



CAUSE
This problem is caused when the style in the Web page has been changed. This change, by default, overrides how the linked style sheet states that the particular style should appear.



RESOLUTION
To correct how the Web page appears and to ensure that your style sheet formatting is reflected in the Web page, use the "!important" argument within the style definition contained in your cascading style sheet.

For example, if you want the text formatted with the H2 (Heading 2) style to appear in the font size of 14 pt and a font color of Red, you normally add the following statement to your cascading style sheet:

H2 {font-size: 14pt; color: red} However, to make sure that this style is always reflected in the Web page, even though the H2 style may specify a different font size and color, add the "!important" argument to each of the style definitions in your style sheet, as in the following example: H2 {font-size: 14pt !important; color: red !important}



MORE INFORMATION
For more information about styles and style sheets, open your Web page and click HTML Source on the View menu. In Microsoft Development Environment, click Search on the Help menu, type "css" in the Type in the word(s) to search for box and click List Topics. Select the topic that you want and then click Display to view the topic.

For more detailed information about cascading style sheets and HTML, please refer to the World Wide Web Consortium at the following Web address:

http://www.w3.org/

Keywords: kbprb KB232548

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.