Stylesheets

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
RFordAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
MadshiConnect With a Mentor Commented:
Thanx for the points...   :-)
0
 
martinagCommented:
Is it between <HEAD> and </HEAD>?

Martin
0
 
martinagCommented:
You could also try embedding STYLESHEET inside "".

Martin
0
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

 
RFordAuthor Commented:
yes it is in the head tag, sorry I shoid have mentioned that.

Also, the quotes around stylesheet didn't fix the problem
0
 
martinagCommented:
I have no idea what could be the problem. Sorry.

Martin
0
 
MasseyMCommented:
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
 
JRheaCommented:
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
 
RFordAuthor Commented:
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
 
chewymonCommented:
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
 
MasseyMCommented:
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
 
martinagCommented:
What does the TITLE tag do? It isn't displayed anywhere and it can be set to just anything, right?

Martin
0
 
martinagCommented:
TITLE attribute, of course :-)

Martin
0
 
MadshiCommented:
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
 
aseem072898Commented:
Netscape messes up these cool things like the Hover can't work work on netscape.
0
 
RFordAuthor Commented:
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
 
MadshiCommented:
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
 
RFordAuthor Commented:
Thanks for all who helped, but it seems this is a netscape issue, not a issue with my code.

Rod
0
 
MadshiCommented:
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
 
jedimikeCommented:
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
 
RFordAuthor Commented:
Didn't fit my problem
0
 
RFordAuthor Commented:
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
 
jedimikeCommented:
whatever....netscape doesnt get affected by spaces.....
0
 
RFordAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.