General discussion

Locked

CSS Browser differences. Why doesn't Ne

By private ·
Why does this code run fine in IE but not in Netscape. In NS 4.7 and 6.0 the top box disappears. There is no logical reason I can see why it does this. What is the trick to get it to work correctly?


<HTML>
<HEAD>
<TITLE>Untitled</TITLE>
<STYLE type="text/css"><-!

#top {
border : thin inset Black;
background-color : Silver;}

#middle {
border : thin inset Black;
background-color : Aqua;
}

#bottom {
border : thin inset Black;
background-color : Yellow;
}
-></STYLE>
</HEAD>
<BODY>
<DIV id="top"><BR>NETSCAPE SUCKS!!!<BR><BR>
</DIV>
<DIV id="middle"><BR>This is stuff in the middle.<BR><BR>
</DIV>
<DIV id="bottom">copyright Someone, MM
</DIV>
</BODY>
</HTML>

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

CSS Browser differences. Why doesn't Ne

by Rcolev In reply to CSS Browser differences. ...

Try repeating the following in your code:

#top {
border : thin inset Black;
background-color : Silver;}

Both Netscape 4.72 and IE 5 accepted the repetition, and the result seems to be OK. Why? I have no idea!

An interesting note: Netscape wouldn't load the reply page; all I got was the banner at the top. Had to use IE for this reply!

Collapse -

CSS Browser differences. Why doesn't Ne

by private In reply to CSS Browser differences. ...

It has soemthing to do with the comment tags. <!- is invalid in NS or something. Grr.

Collapse -

CSS Browser differences. Why doesn't Ne

by private In reply to CSS Browser differences. ...
Collapse -

CSS Browser differences. Why doesn't Ne

by mightyduk In reply to CSS Browser differences. ...

Referring to the w3c spec for HTML 4.0( http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.2.4 )

HTML comments have the following syntax:
<!-- this is a comment -->
<!-- and so is this one,
which occupies more than one line -->

Obviously IE ignores (or supports) the erroneous comment tags <-! ->. This caused NS to ignore the first style. If proper comment tags are used, it will work. NS follows the w3c specs quite closely.

BTW: if you had the life choked out of you by the big bully on the block, you'd suck.

Collapse -

CSS Browser differences. Why doesn't Ne

by private In reply to CSS Browser differences. ...
Back to Web Development Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums