WD2000: Web Page Doesn't Show Style Based on Cascading Style SheetID: Q232548
|
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.
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.
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}
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/
Additional query words:
Keywords : kbdta wd2000
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: May 25, 1999