Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting IE stylesheet code to be netscape compliant

Status
Not open for further replies.

ckennerdale

Programmer
Dec 23, 2000
158
GB
I have some CSS which works in IE. However I need to convert it to be netscape compliant as well (esp fopr the Mac) as was hoping for some help.

I reference the style sheet thus-
<link rel=&quot;STYLESHEET&quot; type=&quot;text/css&quot; href=&quot;style.css&quot;>

In line I reference the style classes thus-
<div id=&quot;divPlayerBackground&quot; class=&quot;clsPlayerBackground&quot;>

and here is a sample of a couple of the classes-

.clsVolumeBar1
{
POSITION: absolute;
LEFT: 20px;
TOP: 8px;
BACKGROUND-COLOR: red;
WIDTH: 3px;
HEIGHT: 3px;
clip: rect(0 3 4 0);
Z-INDEX: 5;
}
.clsVolumeBar2
{
POSITION: absolute;
LEFT: 25px;
TOP: 7px;
BACKGROUND-COLOR: red;
WIDTH: 3px;
HEIGHT: 3px;
clip: rect(0 3 5 0);
Z-INDEX: 5;
}


Any help would be much appreciated Caspar Kennerdale
Senior Media Developer
 
Netscape is a little sensitive to both the syntax in the stylesheet and the way it is implemented in the html document. If it is applying some of the properties from the CSS and not others then it may be the property is not supported. For example (from the Netscape developer site)...
&quot;Positioning empty tag elements (for example, images) is not supported&quot;.

Trial, error and frustration might be the best answer, but Netscape do offer some workarounds on their site.

Good luck ;-)

 
I thought it was'nt possible to refer to a stylesheet in NS by using
<link rel=&quot;STYLESHEET&quot; type=&quot;text/css&quot; href=&quot;style.css&quot;>

but ..
<style type=&quot;text/css&quot; >
.clsVolumeBar1
{
POSITION: absolute;
LEFT: 20px;
TOP: 8px;
BACKGROUND-COLOR: red;
WIDTH: 3px;
HEIGHT: 3px;
clip: rect(0 3 4 0);
Z-INDEX: 5;
}
</style>
in the head of the documnet should work..problem is not all parst of CSS are implemented in NS CSS's (yet)... Just try which ones work..

If i'm wrong plz tell me..cause i've been rewriting my latest ASP pages (using CSS with <div class=&quot;border&quot;> etc.. using borders and stuff.) to Tables in tables and ...old skool stuff... because my CSS didn't work in NS 4.07...


 
NN 4.7 can cope with external style sheets, and I assume earlier 4 releases can as well (although prob not a safe assumption). There are some known problems in its implementation of styles eg

&quot;You cannot assign most styles to the <TABLE> or <TR> elements. Use the <TD> element instead. Exceptions are background image and color on the <TABLE> tag. For other styles, results may vary depending on the complexity of the table and their use is not recommended. &quot; (from DevEdge).

For the full document

 
Ditch NS4! Less than 10% of the population is using it. We need to make our bosses/consumers aware of this or we will be supporting NS3.2 and NS4 for the rest of our lives. Charge double the price to support NS4. Offer only IE4 or even IE5 support and NS6 support (75% population). jared@aauser.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top