Solved

Stylesheets

Posted on 1998-12-11
23
987 Views
Last Modified: 2010-04-09
I am using LINK tag to my stylesheets. All works great in
IE 4 but not in Navigator 4.

My code is

<LINK REL=STYLESHEET TYPE="text/css" HREF="style/mkt.css">

and my stylesheet is

BODY {font: 12 pt Arial}
H1 {font: 22 pt Times; color: navy; text-align: center; font-weight: bold}
H2 {font: 18 pt Times; color: navy; text-align: center; font-weight: bold}

The spec on Nav 4 says it supports this type of stylesheet.

What am I doing wrong?
 
Rod
0
Comment
Question by:RFord
  • 7
  • 5
  • 4
  • +5
23 Comments
 
LVL 4

Expert Comment

by:martinag
ID: 1840476
Is it between <HEAD> and </HEAD>?

Martin
0
 
LVL 4

Expert Comment

by:martinag
ID: 1840477
You could also try embedding STYLESHEET inside "".

Martin
0
 

Author Comment

by:RFord
ID: 1840478
yes it is in the head tag, sorry I shoid have mentioned that.

Also, the quotes around stylesheet didn't fix the problem
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Expert Comment

by:martinag
ID: 1840479
I have no idea what could be the problem. Sorry.

Martin
0
 
LVL 10

Expert Comment

by:MasseyM
ID: 1840480
In your HREF, rather than just the directory, you need to use the entire path.  ie. <LINK REL=STYLESHEET TYPE="text/css" HREF="http://yoursite.com/style/mkt.css"></LINK>

Also, remember the end LINK tag.

Does this work?
0
 

Expert Comment

by:JRhea
ID: 1840481
I don't think there is an answer.  I think Netscape is just screwed up.  I've looked over your problem again and again and don't see anything wrong.
0
 

Author Comment

by:RFord
ID: 1840482
If I use the entire path for the href attribute, that means I have to hard code the path and I don't want to do that the developmental machine is diff from the production box.

Besides, relative paths should work, they do for IE.

I tried the complete path "http://server.domain/" but that doesn't work either.


0
 
LVL 4

Expert Comment

by:chewymon
ID: 1840483
Guess what?  I built an entire page to HTML 4.0 strict specifications.  I then validated it throught the W3C validator.  HTML 4.0 requires the use of the LINK Rel form of css. In Netscape 4.0 all formatting, i.e. positon, background image, etc... was removed.  I was left with a white page with all items left-aligned.  I don't think that NN4.0 supports this form of stylesheet usage.  To fix it I had to put the entire stylesheet in the HEAD of each page.  Sorry to give you bad news.
0
 
LVL 10

Expert Comment

by:MasseyM
ID: 1840484
Here is my LINK tag that works in both browsers.. the only thing that I see missing in yours is the TITLE paramater... ?  Try adding that.

<LINK HREF = "/CRM/BIN/css/default.css" TYPE="text/css" TITLE = "California Roseville Default Style Sheet" REL=STYLESHEET>
0
 
LVL 4

Expert Comment

by:martinag
ID: 1840485
What does the TITLE tag do? It isn't displayed anywhere and it can be set to just anything, right?

Martin
0
 
LVL 4

Expert Comment

by:martinag
ID: 1840486
TITLE attribute, of course :-)

Martin
0
 
LVL 20

Expert Comment

by:Madshi
ID: 1840487
I don't use the title tag, I use relative paths and I use an external files. And nevertheless it works in my homepage!

I've heard, that NetScape has problems with too many spaces. So please try to eliminate as many spaces as possible.

BODY {font:12pt Arial}
H1 {font:22pt Times;color:navy;text-align:center;font-weight:bold}
H2 {font:18pt Times;color:navy;text-align:center;font-weight:bold}

That's the way I do it. And - as I said - it works on my homepage...

Regards, Madshi.
0
 

Expert Comment

by:aseem072898
ID: 1840488
Netscape messes up these cool things like the Hover can't work work on netscape.
0
 

Author Comment

by:RFord
ID: 1840489
I tried the TITLE attribute but that did not make a difference in the rendering of my page.

I also tried removing the spaces, that also made no difference in the rendering of my page.

I don't want to use the <STYLE> tag if I can avoid it. Any one have any other ideas?

Madshi, where's your home page?

Could you post your source code for both the LINK and the css?


0
 
LVL 20

Expert Comment

by:Madshi
ID: 1840490
My homepage is "http://beam.to/madshi".

ns4mad.htm:
"
<html>

  <head>
    <title>Madshi - Informations about Madshi...</title>
    <meta name="description" content="Madshi - Informations about Madshi...">
    <meta name="keywords" content="Madshi, informations, person, human">
    <link rel=stylesheet type="text/css" href="style.css">
    <script language="JavaScript">
      if (!document.layers) {
        if (document.all) { window.location.href="ie4mad.htm" }
        else                window.location.href="oldmad.htm"      }
    </script>
    <noscript><meta http-equiv="refresh" content="0; URL=oldmad.htm"></noscript>
    <script language="JavaScript" src="xx4.js" type="text/javascript"></script>
    <script language="JavaScript" src="ns4.js" type="text/javascript"></script>
  </head>

  <body background="bcklight.gif" bgcolor=#F8F8F8>
    <noscript><a href="oldmad.htm"><font face="Verdana,Arial,sans-serif">Please click here...<a/></noscript>
    <script language="JavaScript">if (document.layers) madPage()</script>
  </body>

</html>
"

style.css:
"
body         { margin-left:10px;margin-top:10px;margin-right:10px;margin-bottom:10px;
               background-image:url(bcklight.gif); background-color:#F8F8F8; }

p,h1,h2,h3,h4,ul,ol,li,div,td,th,address,blockquote,nobr,b,i
             { font-family:Verdana,Arial,sans-serif; }

h1           { font-size:18pt; }

h2           { font-size:16pt; }

h3           { font-size:12pt; }

h4           { font-size:10pt; }

p,ul,ol,li,div,td,address,nobr,b,i
             { font-size:10pt; }

th           { font-weight:bold;font-size:13pt; }

#btnBarIn    { text-align:center;padding-top:14px;text-decoration:none;
               font-family:sans-serif;font-size:13pt;font-weight:bold;font-style:normal;color:#444444; }
#btnBarOut   { text-align:center;padding-top:14px;text-decoration:none;
               font-family:sans-serif;font-size:13pt;font-weight:bold;font-style:normal;color:#EEEEEE; }

#listIn      { padding-left:24px;padding-top:3px;text-decoration:none;
               font-family:Verdana,Arial,sans-serif;font-size:10pt;font-style:normal;color:#EEEEEE; }
#listOut     { padding-left:24px;padding-top:3px;text-decoration:none;
               font-family:Verdana,Arial,sans-serif;font-size:10pt;font-style:normal;color:#000000; }

#title       { text-decoration:none;font-family:Verdana,Arial,sans-serif;font-size:10pt;font-weight:bold; }

a:link       { color:#brown;text-decoration:underline; }
a:visited    { color:#red;text-decoration:underline; }
a:active     { color:#black;text-decoration:none; }
"

Regards... Madshi.
0
 

Author Comment

by:RFord
ID: 1840491
Thanks for all who helped, but it seems this is a netscape issue, not a issue with my code.

Rod
0
 
LVL 20

Expert Comment

by:Madshi
ID: 1840492
Are you using layers?
Because the tags your using sometimes have no effect in layers.

Try something like
  #test { font-family:Arial;font-size:10pt }
in your style sheet.

Then
  <p id="test">test text</p>
in your html.

Does that work? If yes, then your style sheet file is propertly loaded...

Regards, Madshi.
0
 
LVL 2

Expert Comment

by:jedimike
ID: 1840493
I also noticed something like this happening to me...I did trial and error until I found one that worked...

First----I did it on the Anchor tag not the LINK tag...
A { blahblahblah....}
you could try defining classes for .link .alink .vlink
A.link {blahblah}

and second---I only got this to work in netscape when I defined the style sheet inside the anchor tag too!! <a href="blah" style="blah">BLAH</a>
0
 

Author Comment

by:RFord
ID: 1840494
Didn't fit my problem
0
 

Author Comment

by:RFord
ID: 1840495
I got my stylesheet to work after playing around with some ideas that were sparked by Madshi's comment on 12/16.

The problem was that I was using tables. So I needed a TD entry in my stylesheet.

Thanks Madshi, if you'll post an answer here, I'll give you the points.



0
 
LVL 20

Accepted Solution

by:
Madshi earned 20 total points
ID: 1840496
Thanx for the points...   :-)
0
 
LVL 2

Expert Comment

by:jedimike
ID: 1840497
whatever....netscape doesnt get affected by spaces.....
0
 

Author Comment

by:RFord
ID: 1840498
It wasn't spaces. I simply needed to utilize a TD line in my stylesheet to define the text in a table cell. I never said it had anything to do with spaces. Madshi's test options helped me to find this.

Besides I got my stylesheet to work w/o placing in a <A> tag.


0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Javascript 2 39
How do I Enable submit button only if listbox has items 4 36
CSS question 4 30
HTML editor custom button 3 60
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.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

696 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