Solved

CSS compatibility problems.

Posted on 2000-02-16
9
149 Views
Last Modified: 2010-04-09
Greets.

After glancing at the CSS 2 Specification, I wrote the following style sheet:

BODY {
    font-family:"Verdana", "Arial", sans-serif; font-style:normal;     font-size:medium;
    background-image:URL(Images/Universe.gif);     background-repeat:repeat; background-attachment: fixed;
    text-decoration:none; text-transform:none;
      color:#CDC9B4;
}

@font-face {
 font-family: "Verdana";
 src: local("Verdana"), url("System/Verdana.ttf") format ("type-1");
}

A:link {
 color: #A6CAF0;
 text-decoration: none;
}

A:visited {
 color: #A6CAF0;
 text-decoration: none;
}

A:active {
 color: #A6CAF0;
 text-decoration: none;
}

TABLE {
    border-top:0; border-bottom:0; border-left:0; border-right:0;     border-top-width:0; border-bottom-width:0; border-left-width:0;     border-right-width:0; border-style:none;
    font-style:normal; font-size:medium;
    text-decoration:none; text-transform:none;       
}

TH {
    font-weight:lighter;
    color:#BFA262;
}

This works perfectly with IE 4 but it gets all messed up with Netscape. Do you know where the problem might be? The only thing I know is that if I remove the TH and its specifications it will work better.

Thank you in advance.
0
Comment
Question by:Badder
9 Comments
 

Expert Comment

by:genef
ID: 2529397
First of all, try to exclude complicated colors, just use simple ones. They may mess everything, though this is not obvious.
I'm not sure what else could help,
Gene
0
 
LVL 11

Expert Comment

by:kmartin7
ID: 2529595
Netscape does not fully support CSS yet. One of the areas it really lacks is CSS support for tables.  Gecko promises to fully support CSS like IE5 does now...

You could create your own class and add it to the individual table cells:

..tblHeader {
    font-weight:lighter;
    color:#BFA262;
}

<th class="tblHeader">


Kurt
0
 
LVL 11

Expert Comment

by:kmartin7
ID: 2529597
That should be a single dot on tblHeader:

..tblHeader {
    font-weight:lighter;
    color:#BFA262;
}

Kurt



0
 
LVL 11

Expert Comment

by:kmartin7
ID: 2529599
It is adding another period for some reason! It should be a single period in front of tblHeader like so

>>   .tblHeader{
>>    font-weight:lighter;
>>    color:#BFA262;
>>   }


0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 7

Accepted Solution

by:
nettrom earned 200 total points
ID: 2530955
Netscape's support for CSS2 is next to non-existant.  the only thing I know it supports is positioning.  therefore, if you want something that works in both Netscape and IE you'll have to use CSS1, and then only the part of CSS1 that both browsers understand.

what you can do is try to create a style sheet that works in both browsers, and then see if it's possible to apply only a few CSS2 rules without breaking the support.  useful tools for checking the style sheet while working are W3C's CSS2 validator, and HTMLHelp's CSSCheck.  http://jigsaw.w3.org/css-validator/ and http://www.htmlhelp.com/tools/csscheck/ respectively.

quick things I noticed:

1: you don't need to quote font family names which do not contain whitespace
2: I'd quote the URL to the background image
3: would be nice with a defined background color if the background image wasn't loaded
4: background-repeat & background-attachment are both probably not supported by Netscape (I know Netscape can't do fixed backgrounds easily).
5: the @font-face rule of course won't work in Netscape since it's CSS2
6: you should be able to combine all the link rules on one line separating them with commas.  also, add background color so it doesn't clash with user-defined stylesheets (CSSCheck will warn you about this)
7: the table properties will probably not in Netscape.  see the Netscape CSS bug list http://developer.netscape.com/support/bugs/index.html?content=known/css.html

that's what I noticed at a glance.  http://www.css.nu/ can probably give more useful information about CSS support.

(I could write a few paragraphs about IE (both 4 & 5) and their sucky CSS-handling too, but I'll refrain from more than this comment :)
0
 
LVL 11

Expert Comment

by:kmartin7
ID: 2531029
About the last paragraph added to nettrom's manifesto (which, I might add, only expounds my comment!) =)

IE4/5's handling of CSS may be 98% of what the standard holds, but this is almost double what Netscape handles!  So saying that IE4/5's handling of CSS is "sucky" is taking it a little too far?

By the way, nettrom, you owe me.  Or have you forgotten???

Kurt

0
 
LVL 7

Expert Comment

by:nettrom
ID: 2531300
ack Kurt, I've totally forgotten.  sorry.  refresh my memory, please. if you don't want to do it here, mail me on warnckew@online.no

re the 'sucky' comment... yes, it's a slightly provocative exaggeration, it's not totally bad.  and yes, compared to Netscape it has great CSS-handling.  but I've never said that Netscape doesn't suck when it comes to CSS either (at least I haven't tried to, but I might've come across as saying so).

I'm fairly biased when it comes to IE4/5 and CSS.  back when IE5 was released about a year ago, Microsoft went out and claimed that things would be so much better.  they aren't.  I've run IE5 through the CSS 1 test suite, and compared to the CSS standard the result is not at all pleasing.  that they don't support pseudo-classes like 'first-letter' and 'first-line', but do support CSS2 'hover' tells me that someone, somewhere hasn't got their priorities straight.

I'd rather have a really, really, really good CSS1-implementation over a partly good CSS1 + CSS2-implementation any day.

the only browsers I feel don't suck when it comes to CSS is Mozilla and Opera.  I know I'm very biased about the latter. :)

(I'll be happy to move this into a different question if that's necessary, like creating a 0-point question just for the thread, if that's not against E-E policies.)
0
 

Expert Comment

by:Entropy
ID: 2532507
Just a thought but I have added imported style sheets based on the browser using a little coding...  I know it isn't a solution but it might do as a work around.

My site basically states that if you don't have IE 5 then you are missing half the effects.  I am IE partial obviously.  I refuse to condone anything Netscape as long as AOL has their teeth in it.

Former Netscape Fanatic
Entropy
0
 

Author Comment

by:Badder
ID: 2544130
Both KMartin and Nettrom elucidated me of the source of the problem.. As I don't have much time to search the web, those links proved to be very useful.

Thank you all.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article discusses how to create an extensible mechanism for linked drop downs.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…

758 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

21 Experts available now in Live!

Get 1:1 Help Now