SitePoint Sponsor

User Tag List

Results 1 to 13 of 13
  1. #1
    Non-Member spdrcr's Avatar
    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?

  2. #2
    Prolific Blogger silver trophy Technosailor's Avatar
    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 }
    HTH.
    Sketch
    Aaron Brazell
    Technosailor



  3. #3
    Next stop: PHP! Marina's Avatar
    Join Date
    Apr 2001
    Location
    Sweden
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can assign different classes to your links. Here are some tutorials:
    http://www.westciv.com.au/style_mast...ook/links.html (2)


  4. #4
    Non-Member spdrcr's Avatar
    Join Date
    Sep 2000
    Location
    Oklahoma City, OK
    Posts
    214
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks...

  5. #5
    Non-Member spdrcr's Avatar
    Join Date
    Sep 2000
    Location
    Oklahoma City, OK
    Posts
    214
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmmm, still not working...

  6. #6
    Prolific Blogger silver trophy Technosailor's Avatar
    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
    Aaron Brazell
    Technosailor



  7. #7
    Non-Member spdrcr's Avatar
    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; }
    If you want to see the site it's going on let me know

    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 14:41.

  8. #8
    Prolific Blogger silver trophy Technosailor's Avatar
    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
    Aaron Brazell
    Technosailor



  9. #9
    Non-Member spdrcr's Avatar
    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

  10. #10
    SitePoint Wizard Ian Glass's Avatar
    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;
    }
    Your stylesheet is really convoluted as it stands now. These effect may not be the ones you were aiming for, but it's what I got from you style rules. You should really get it to be more concise code.

    Also, you should note that you can't add a pseudo-class to another (i.e. no "a:active:hover").

    ~~Hope This Helps
    Last edited by Ian Glass; Feb 15, 2002 at 16:08.

  11. #11
    Non-Member spdrcr's Avatar
    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

  12. #12
    SitePoint Wizard Ian Glass's Avatar
    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

  13. #13
    Non-Member spdrcr's Avatar
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •