css question...
I have the following saved in a global.css file that is included in each page on my site:
a { text-decoration: none; }
a:link { color:"red"; }
a:visited { color:"red"; }
a:hover { color:"#03403C"; text-decoration: underline; }
body { font-family: Tahoma; font-size: 10pt; color: "black" }
td { font-family: Tahoma; font-size: 10pt; color: "black" }
My question is, is it possible to have a different style sheet defined for the left & riht hand navs on my site, the link is in the sig...
The reason I ask is that the link color of red looks fine in the central part of the site but looks crap when overlayed on the green background of the sidebars!
I think you would do it using the class attribute but I'm not sure...
Anyone help with what is probably a simple problem?
openmind posted this at 20:39 — 9th September 2001.
He has: 945 posts
Joined: Aug 2001
Never mind I've sussed it with a little help form Builder.com.
I've just added the class="nav" attribute to the table containing the links I want to be different and added the lines:
.nav
a:link { color:"white"; }
a:visited { color:"#03403C"; }
a:hover { color:"#03403C"; text-decoration: underline; }
Thought it was simple!
Megan posted this at 20:41 — 9th September 2001.
She has: 11,421 posts
Joined: Jun 1999
Your link to the external stylesheet isn't working in NS 6.1 for some reason - I don't know why.
What you need to do is define different classes of links. You'll leave this the way it is to define your general links, then you'll define a second set of links using classes, so you'll have:
a { text-decoration: none; }
a:link { color:"red"; }
a:visited { color:"red"; }
a:hover { color:"#03403C"; text-decoration: underline; }
a.nav { text-decoration: none; }
a.nav:link { color:"something"; }
a.nav:visited { color:"something"; }
a.nav:hover { color:"something else"; text-decoration: underline; }
Then your nav links will look like this:
Link Name
Megan
Connect with us on Facebook!
openmind posted this at 20:45 — 9th September 2001.
He has: 945 posts
Joined: Aug 2001
Thnx for the reply Megan...anyone know why the NS 6.1 doesn't like the style link? I'm using the following format to link the style sheet to each page. The link is place between the & tags:
Any ideas?
Busy posted this at 02:00 — 10th September 2001.
He has: 6,151 posts
Joined: May 2001
Could be the quotes and order, just use:
a:link.nav {color: red;}
or
a:link.nav {color: #FF0000;}
etc
note the a:link is first
then on your link, add class="nav"
and you dont need to use title="Global" in the link rel=stylesheet tag
Megan posted this at 02:08 — 10th September 2001.
She has: 11,421 posts
Joined: Jun 1999
No, I was curious about that, so I downloaded his page, brought it into homesite and put the stylesheet into the page itself rather than using it externally and it's working that way. It's got to have something to do with the way its linked ... I don't know!
Megan
Connect with us on Facebook!
2K mediat.com posted this at 09:19 — 11th September 2001.
They have: 8 posts
Joined: Aug 2001
This is just a hunch, but most likely u have spelled something wrong. Netscape is very "thight" requiring the same cases (a=a, not a=A) and spelling in elements and paths. It could very well be the underscore in href that is causing all the headache(ns has some problems with it in some cases)...
2K mediat
ASP,CSS,DOM,Internet marketing,VPN,XML
140+ guides and growing...
pbaugher posted this at 23:02 — 29th September 2001.
They have: 15 posts
Joined: Sep 2001
Could it be this directory? _private is usually a hidden directory.
Bimjo posted this at 04:51 — 2nd October 2001.
They have: 81 posts
Joined: Feb 2000
NS just really doesn't like underscores in filenames for links to stylesheets.
As pbaugher pointed out, if your stylesheet resides in a directory called _private you should probably move it to another directory. Maybe something like style, or stylesheet.
hth
Bimjo
Just my opinion, worth $0.00001 anywhere on earth.
======================
Bimjo's Corner
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.