cascading style sheet browser compatibilitythe trouble with stylesheets how to avoid problems with cascading stylesheetsthe rule when using css is to avoid depending depending on a stylesheet completely, and use html to mimic the stylesheet as closely as possible. 1. cascading style sheet compatibility Although stylesheets (css1) have been supported since netscape 4.0 and microsoft internet explorer 4 (partial css1 support from IE3) users do have the option of simply 'turning off' stylesheets and this should be considered when using stylesheetsIt should also be noted that if a netscape user disables "javascript" (and some of them do!) css seems to be disabled automatically 2. netscape and stylesheets This is where it all falls down!It is absolutely essential to check any html documents that use a stylesheet, with a netscape browser, this cannot be emphasised enough, as effects can be rendered very differently than they would apear using a microsoft internet explorer browser particulaly when stylesheet elements are used in table cells. Netscape seems to 'see' table cells as independent documents and renders the contents of a table cell as a default appearance, for instance although the "arial" font may be spcified in the body tag any text in a table cell will be given a default appearence, which means whatever font the user has set as their defalt. to overcome netscape problems with tables and stylesheets there are one or two things we can do one of which is use the stylesheet to give the <TD> tag the same properties as the <BODY> tag
html tags that use a 'class' seem to work well, and another simple solution is to use the <DIV> tag. find out about DIV and more in the next module. 3. a little advice a stylesheet can be used to affect almost any html tag and can have a great deal of power over the appearance of a html document, and the first temptation is to add css values to the most commonly used html tags, however it is strongly advised that stylesheet properties are not given to the font tag as keeping this tag free gives a great deal of flexibility in text formating
|
![]() css tutorial |