• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

css and netscape

cheatpark

­
NLC
I am using css in my new site and it works fine in ie, mozilla and opera but when I go to it in netscape it just doesn't want to work. Here's the css I use:

Code:
body
{
     font-family: Arial, Helvetica, sans-serif;
     font-weight: bold;
     color: #000000;
}
p
{
     text-decoration: none;
     font-weight: none;
     color: #000000;
}
a
{
     font-family: Arial, Helvetica, sans-serif;
     font-weight: bold;
     text-decoration: none;
     color: #c5102b;
}
td
{
background-color: #FFFFFF;
}
tr
{
background-color: #FFFFFF;
}
table
{
width: 100%;
background-color: #FFFFFF;
border-style: solid; 
border-width: 0;
padding-left: 4; 
padding-right: 4; 
padding-top: 1; 
padding-bottom: 1;
}

You can view a page which uses the above css code at http://www.cheatpark.net/websitearena.html . Thanks in advance. Remember: It only doesn't work in netscape. It works fine in opera, ie and mozilla.
 
It would have helped if you had told us whích Netscape you are talking about. This is only half the story.

Invalid rules below (as for instance the w3c checker could have told you).

body

{
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
color: #000000;
}
p
{
text-decoration: none;
font-weight: none;
color: #000000;
}
a
{
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
text-decoration: none;
color: #c5102b;
}
td
{
background-color: #FFFFFF;
}
tr
{
background-color: #FFFFFF;
}
table
{
width: 100%;
background-color: #FFFFFF;
border-style: solid;
border-width: 0;
padding-left: 4;
padding-right: 4;
padding-top: 1;
padding-bottom: 1;

}
 
Last edited:
Use a valid Style Sheet to start with. But what is the problem? My Netscape4.5 seems to get most of it. :confused:
 
I just noticed that the text wasn't formatted the way you've intended it to be in Netscape 4.x. That's because you've only done the body text. Text in tables isn't considered body text in Netscape 4.x.
 
The way netscape does the tables also looks different. There are grey lines between the rows in the tables. :mad:
I'm not sure if this is ok but this css works fine it ie:

Code:
a
{
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
text-decoration: none;
color: #c5102b;
}
body,td,p,table
{ 
font-family: Arial, Helvetica, sans-serif;
color: #000000;
font-size: 12;
}
 
You're missing the # in nearly all of your colors. Example:

bgcolor="FFFFFF"

That should be

bgcolor="#FFFFFF"

The thin line between the title and the welcome is because of the "cellspacing=1" in your table, there's a one pixel gap.

You've also multiple <html> and </html> tags. I'd assume that's what's causing the bigger breaks between tables.
 
You don't have any units with your sizes in the Style Sheet.

font-size: 12 what? px, %, em, mm...? Same with your paddings.

I don't see any spaces between your table rows. I see spaces between your tables. Not putting <html> and </html> between them will probably help a bit.
 
Um... do I need to talk slower and louder? :)

The top table is wider than the middle and bottom tables because you've got it coded that way. This is the <table> tag for the top table:

<table width="100%" border="0" align="center" cellspacing="0" cellpadding="0" bgcolor="FFFFFF">

Here it is for the middle table:

<table width="100%" border=0 cellspacing=1 cellpadding=1 bgcolor=FFFFFF>

Notice the different cellspacings? The middle and bottom tables are two pixels smaller than the top one.

There's a gap between the top table and the middle table because of this:

</table>
<html>
<table width="100%" border=0 cellspacing=1 cellpadding=1 bgcolor=FFFFFF>

That's the way you've got it coded. Change it to this:

</table><br><table width="100%" border="0" cellspacing="0" cellpadding="1" bgcolor="#FFFFFF">

Get rid of the <html>, get rid of the cellspacing (leave the padding if you want, it doesn't matter), get rid of the spaces between the tables and just replace them with a <br>.

For the gap between the bottom and middle tables:

</table>
</html>
<table width="100%" bgcolor="FFFFFF" border="0">
<tr>
<td colspan="3" height="2" valign="top" bgcolor="FFFFFF">
</html>
<div align="center">
WebsiteArena created this page in 0.196861 seconds.<br><html>
Copyright &copy;2002 WebsiteArena. All rights reserved.</div>
</td>
</tr>
</table>
</body>
</html>

Change that to:

</table><br><table width="100%" bgcolor="#FFFFFF" cellspacing="0" border="0">
<tr><td valign="top" bgcolor="#FFFFFF" align="center">
WebsiteArena created this page in 0.196861 seconds.<br>
Copyright &copy;2002 WebsiteArena. All rights reserved.
</td></tr>
</table>
</body>
</html>

It wouldn't hurt if you'd clean up the rest of your HTML, either. Stuff like:

<tr><div align="center">
</div></td></tr>

And other things like assigning colspans of three to tables with only one column, giving invalid colors, assigning cell heights far, far too small for their contents, etc.
 
I don't think the new version is up or he hasn't changed much at all. :confused:

Cheatpark, another thing is that it's not a good idea to mix presentational HTML and CSS as you do. Use CSS for text formatting and leave the rest to HTML or go all the way with CSS.

Specifying the same properties for the same elements in both HTML and CSS can confuse browsers and you'll get a different result depending on how old the browser is. Doubling the same value as you do here and there is to no use at all.

Above all, as Dusty said, see to it that your HTML is correct before you apply CSS to it.
 
websitearena.jpg


I sorted out the tables problem and corrected the html. The one problem is that it won't display the grey background behind the white tables but I suppose I'll have to live with it.
 
Back
Top