Solved

Stylesheets

Posted on 1998-12-11
23
963 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
 
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
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…

760 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

22 Experts available now in Live!

Get 1:1 Help Now