Solved

CSS Question

Posted on 2000-04-03
11
152 Views
Last Modified: 2010-04-09
I have a CSS file that applys settings for a table...

It looks great in Internet Explorer, but netscape ignores some of the tags...  

The simplified table and CSS can be found here.
www.coopa.demon.co.uk/ee/test.htm
www.coopa.demon.co.uk/ee/test.css

The Question is...  
How can I alter the CSS file so that this table appears fine in netscape ?
Does Netscape support all of these css features ?
Is there another method ?

Help please...

400 points for anyone who can completely solve this.
0
Comment
Question by:coopa
11 Comments
 
LVL 5

Expert Comment

by:tzarad
ID: 2680508
You have to add the following line in your css

TD {
      FONT-FAMILY: arial, helvetica, swiss, sans-serif; FONT-SIZE: 7pt; FONT-WEIGHT: bold
}

The first line :120 will still be out of size because you forgot to close the </td>

Hope it helps
Qapla'

0
 
LVL 2

Author Comment

by:coopa
ID: 2680532
Okay...  half way there...

But why is netscape ignoreing the stuff under the <TH> tag ?

th {
color = white;
background-color = #004080;
font-family: arial, helvetica, swiss, sans-serif;
font-weight: bold;
font-size: 7pt;
}
0
 
LVL 1

Expert Comment

by:damianosky
ID: 2680571
Netscape supports only a limited version of CSS1, while explorer supports both CSS1 and CSS2.

What you are experiencing is only one of the variuos strange behaviours Netscape has regarding CSS.

Regarding font type, this is one of the problems. For example, if you redefine the font layout-type for the tag <p>, if you use within a <b> tag, this is not applied: you must redefine also the <b> tag to get the right formatting.

Strange, but is true...

If you need font control, i suggest you to try this: define a style class like this example:

<style>
<!--
..my_font_class { font-family: arial, elvetica, swiss, sans-serif; font-weight: bold; font-size: 7pt }
//-->
</style>

and then apply it to your text in this way:

<font class="my_font_class">your text</font>

It's not so flexible, but this way should guarantee you similar results both on Explorer and Netscape

0
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
LVL 2

Author Comment

by:coopa
ID: 2680589
Thanks damianosky,

That still doesn't explain why it works with TD but not with TH....  

The TH code is almost identical as the TD code but is being completely ignored.
0
 
LVL 2

Author Comment

by:coopa
ID: 2680595
I have updated the example (with tzarad's comments):
www.coopa.demon.co.uk/ee/test.htm 
www.coopa.demon.co.uk/ee/test.css 
0
 
LVL 1

Expert Comment

by:damianosky
ID: 2680668
Probably there is no valid reason...

Simply Netscape does not allow you to redefine th: th is the header of table's cells; yours is a question probably only netscape's men can answer...

I've seen your code... Formerly, it's correct.

As i've told you, this is only one of the mysteries of Netscape behaviour...

Also font dimension is not the real dimension: Netscape use the most similar dimension between the 7 standard levels (according also to the configuration in your preferences).

Moreover, why you need to use TH? Yes, of course, this is HTML-compliant, but there is no obligation to not use simply TD with a class definition as i've suggested you...

Just a roundtip... i know... :-|

0
 
LVL 2

Author Comment

by:coopa
ID: 2680685
> Moreover, why you need to use TH?
Because after i've finished designing 'the perfect' style sheet, a bunch of complete computer illerterates are going to use it to produce live web pages...  

Having the ability to specify cells in a table as being 'header cells' may help these imbeciles... hehehe.

8o)
0
 
LVL 1

Expert Comment

by:damianosky
ID: 2680711
Couriosely, i've donwloaded your code on my PC and now on my Communicator (Italian version 4.5) your code does its work with TH, while with TD the character dimension fails... (while on the web the behaviour is the yours...)!!!

mmmm....mystery

This is an interesting and courious problem...


0
 
LVL 2

Author Comment

by:coopa
ID: 2680721
I'll leave the question open just in case anyone else has anything to offer.
Thanks anyways.
0
 
LVL 1

Accepted Solution

by:
tarassov earned 100 total points
ID: 2681031
Here is the answer for your question. I have tested your css file and found out that problem was in this string:
background-color = #004080;
Netscape doesn't like "=" symbol as I see ;)

So, the th style should look like this:

th{
 Color: white;
 fontFamily: arial, helvetica, swiss, sans-serif;
 fontSize: 7pt;
 backgroundColor: "#004080";
 fontWeight: bold;
}

Best wishes,

  Andrey
0
 
LVL 2

Author Comment

by:coopa
ID: 2681816
tarassov:
Perfect answer.... Although you only solved half.

tzarad: I owe you some points... I will post as a separate question.


0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How can I upload multiple images from a HTML form? 2 27
ASP.net Fit 3 divs on screen side by side 3 24
maps stopped work unsure why 7 33
Javascript_Set_dropdown_value 7 31
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now