SitePoint Sponsor |
|
User Tag List
Results 1 to 13 of 13
-
Feb 15, 2002, 14:35 #1
- Join Date
- Sep 2000
- Location
- Oklahoma City, OK
- Posts
- 214
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Need links same color w/ different background
Ok, I'm designing a site, and for the sidebar the background is #006699, and in the CSS code I made it so that any link visted is #006699, but I thought I had a way in which the links on that sidebar would stay white after clicking on them, they did...
The problem is, the page background is #E5E5E5 and I can't seem to get the links not on the sidebar to stay #006699 after being clicked.
Lemme run through that again so as not to confuse anyone. Sidebar background is #006699, in the Style Sheet, I have it set that any link is #006699, I added some code that a friend told me to use in which those links on the sidebar would stay white no matter what, that worked, BUT...the links not on the sidebar turn white after being clicked on, and still show the hover color. What do I need to do to divide the two up and not have problems like this?
-
Feb 15, 2002, 14:53 #2
- Join Date
- Jun 2001
- Location
- Before These Crowded Streets
- Posts
- 9,446
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
set your visited color:
Code:a:visited { color: your color }
Sketch
-
Feb 15, 2002, 14:58 #3
You can assign different classes to your links. Here are some tutorials:
http://www.westciv.com.au/style_mast...ook/links.html (2)
-
Feb 15, 2002, 15:16 #4
- Join Date
- Sep 2000
- Location
- Oklahoma City, OK
- Posts
- 214
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks...
-
Feb 15, 2002, 15:26 #5
- Join Date
- Sep 2000
- Location
- Oklahoma City, OK
- Posts
- 214
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hmmm, still not working...
-
Feb 15, 2002, 15:28 #6
- Join Date
- Jun 2001
- Location
- Before These Crowded Streets
- Posts
- 9,446
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
mind pasting your stylesheet so I can see it?
Sketch
-
Feb 15, 2002, 15:37 #7
- Join Date
- Sep 2000
- Location
- Oklahoma City, OK
- Posts
- 214
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Code:<STYLE type="text/css"> TEXTAREA, .bginput { FONT-SIZE: medium; FONT-FAMILY: Tahoma, Verdana, Arial, Sans-serif; COLOR: #000000; BACKGROUND-COLOR: #E5E5E5; } A:link, A:visited, A:active { COLOR: #006699; } A:hover { COLOR: #FF9933; } #cat A:link, #cat A:visited, #cat A:active { COLOR: #006699; TEXT-DECORATION: none; } #cat A:hover { COLOR: #FF9933; TEXT-DECORATION: underline; } #ltlink A:link, #ltlink A:visited, #ltlink A:active { COLOR: #006699; TEXT-DECORATION: none; } #ltlink A:hover { COLOR: #FF9933; TEXT-DECORATION: underline; } .thtcolor { COLOR: #FFFFFF; } body { scrollbar-3dlight-color: grey; scrollbar-arrow-color: #FFFFFF; scrollbar-base-color: grey; scrollbar-darkshadow-color: #EDF2F2; scrollbar-face-color: #006699; scrollbar-highlight-color: #EDF2F2; scrollbar-shadow-color: grey; font: 10px Tahoma; cursor: default; background-color: #E5E5E5} B { color: #FF9933; } a { font-weight : bold; color : #008800; text-decoration : none; } a:active { font-weight : bold; color : #006699; text-decoration : none; } a:visited { font-weight : bold; color : #006699; text-decoration : none; } a:visited:hover { font-weight : bold; color : #FF9933; text-decoration : none; } .rowone { color: white; } a.special { color: white; } a:visited { color: white; } a:visited:hover { color: #FF9933; }
I've gotten the sidebar links, which remain white after visiting the link, working right, but anywhere else on the page where there is a visited link they are white as well.Last edited by spdrcr; Feb 15, 2002 at 15:41.
-
Feb 15, 2002, 15:39 #8
- Join Date
- Jun 2001
- Location
- Before These Crowded Streets
- Posts
- 9,446
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
you have a:visited:hover....change that to just
a:hover
Sketch
-
Feb 15, 2002, 15:42 #9
- Join Date
- Sep 2000
- Location
- Oklahoma City, OK
- Posts
- 214
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Done, but still the second half is still giving me problems
-
Feb 15, 2002, 17:06 #10
- Join Date
- Oct 2001
- Location
- Beyond yonder
- Posts
- 2,384
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Yeah, it may be best to post the link. But what I really want to know is what you've called the sidebar.
Here's what I think the relevant code might be:Code:/* The default setup for all the links on the page */ A { color: #069; font-weight: bold; text-decoration: none; /* you really should keep underlines on links! */ } A:VISITED { color: #fff; } A:HOVER { color: #F93; } A:ACTIVE { color: #069; } /* Style rules for the sidebar area */ .sideBar A { text-decoration: underline; }
Also, you should note that you can't add a pseudo-class to another (i.e. no "a:active:hover").
~~Hope This HelpsLast edited by Ian Glass; Feb 15, 2002 at 17:08.
-
Feb 15, 2002, 19:44 #11
- Join Date
- Sep 2000
- Location
- Oklahoma City, OK
- Posts
- 214
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I've cut out some stuff, and whatnot, the sidebar is the Navbar...
Right now i'm just gonna give it a rest, I think it's partly the reason why I have a headache right now...
The website isn't for me, of course, but I uploaded it to an account of mine just to see what it would look like, if you must see it http://www27.brinkster.com/thehelpfiles
-
Feb 15, 2002, 23:43 #12
- Join Date
- Oct 2001
- Location
- Beyond yonder
- Posts
- 2,384
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I'd just suggest to take it from the top and create a new stylesheet. As it stands now, I think it'd be easer. There's a bunch of redefined rules and I don't know which ones you want.
~~Ian
-
Feb 16, 2002, 08:38 #13
- Join Date
- Sep 2000
- Location
- Oklahoma City, OK
- Posts
- 214
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
One problem about that...I don't know how to write one.
I copied that one from a site and modified everything I needed...
Bookmarks