Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jun 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question CSS Troubles, I Don't think I am understanding this right.

    First off, thank you for your help!

    Here's background: I know basic HTML, but nothing fancy. I needed a website with something other than basic HTML so I hired a friend to help me set up the basic coding aspect of the site. After a few revisions I didn't want to bother him anymore with all my little nitpicks (and I wanted to try to learn a bit of coding myself). Now I have a site pretty much the way I want it, except I am having CSS troubles. I never really understood why CSS had to be so picky and sensitive!

    Here's my problem: http://test.nspratt.com/index.html This is the exact code my friend gave me. When I copy paste the pages that are not complete, the hover attribute stops working for the links. I really have no clue what is wrong. I played around with the code a bit, but really I have no idea what could have gone wrong. Is it what I have done or could it be something my friend coded wrong?

    EDIT: I am editing with Macromedia Dreamweaver 8

    Thanks so much again
    Last edited by Shmithers; 06-19-2009 at 08:55 PM. Reason: Adding more information.

  • #2
    Senior Coder tomws's Avatar
    Join Date
    Nov 2007
    Location
    Arkansas
    Posts
    2,644
    Thanks
    29
    Thanked 330 Times in 326 Posts
    Try removing the a:visited from the css. The colors change as expected until you've visited the links.

    Order may have something to do with it. Perhaps before removing a:visited, move that block above the a:hover block in the css file.

    EDIT: By the way, if you're building a new site, it would be wise to toss the old coding styles and build it cleanly from the start. All those line breaks? Bad. No doctype? Really bad. Run your site through the validator for a start on the cleanup process.
    Last edited by tomws; 06-19-2009 at 09:47 PM.
    Are you a Help Vampire?

  • #3
    New Coder
    Join Date
    Jun 2009
    Posts
    35
    Thanks
    4
    Thanked 1 Time in 1 Post
    You have this in your css:

    Code:
    A:HOVER {
    	COLOR: #444444;
    }
    
    A:VISITED {
    	COLOR: #888888;
    }
    If you put it this way it will work:

    Code:
    A:VISITED {
    	COLOR: #888888;
    }
    
    A:HOVER {
    	COLOR: #444444;
    }
    Last edited by GaVrA; 06-20-2009 at 06:26 AM. Reason: typo


  •  

    Tags for this Thread

    Posting Permissions

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