Free Web Hosting Provider - Web Hosting - E-commerce - High Speed Internet - Free Web Page
Search the Web

cascading style sheet browser compatibility (IE and netscape css)
 

cascading style sheet browser compatibility

the trouble with stylesheets

how to avoid problems with cascading stylesheets

the 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 stylesheets

It 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

 NOTEPAD
 File   Edit   Search   Help 

<STYLE>
 BODY {
       background-color: black; 
       color: white;
 }

 TD {
     background-color: black; 
     color: white;
 }
</STYLE>

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

home
home

next: css, div & span
previous: stylesheets class & ID

html tutorial css tutorial javascript webmaster articles link exchange

css tutorial