SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Enthusiast jejcorbett's Avatar
    Join Date
    Apr 2010
    Location
    Brisbane, Australia
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CSS Hover link hell! Never figured this out

    Hey guys,

    I have finally cracked and stopped trying to figure it out myself. I have been hampered by this constant problem with my a:hover in the my websites for a long time.

    It seems that my a:hover styling applies to all links on the page. I'm sure the answer is simple and I am just writing my code in the wrong format.

    Here is a link to the page I am working on.

    I'm not sure if you guys need me to post the CSS.

    Thanks in advance

  2. #2
    SitePoint Enthusiast jejcorbett's Avatar
    Join Date
    Apr 2010
    Location
    Brisbane, Australia
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ROFL link would help.

    http://www.itsnotdeadyet.com/store

  3. #3
    SitePoint Enthusiast jejcorbett's Avatar
    Join Date
    Apr 2010
    Location
    Brisbane, Australia
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry it is when you click the links and they become active that is the problem.

    For example if you click the email or the web address at the bottom left you can see it gets a drop shadow applied to it like the links in the navigation, where as it is not suppose to be like that.

  4. #4
    SitePoint Enthusiast Cory R's Avatar
    Join Date
    Mar 2009
    Posts
    94
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code CSS:
    #leftcontent a:active {
    font-weight: normal;
    text-shadow: 0 0;
    }

  5. #5
    SitePoint Enthusiast jejcorbett's Avatar
    Join Date
    Apr 2010
    Location
    Brisbane, Australia
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So i have to do that to every div with a link in it?

    How come the styles from the #mainnav div don't just apply to that div and seem to roll over into all my other links?

  6. #6
    SitePoint Enthusiast Cory R's Avatar
    Join Date
    Mar 2009
    Posts
    94
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code CSS:
    #mainnav ul li a:hover, a:active {
    	color: #cc6600;
    	font-weight: bold;
    	text-shadow: 1px 1px 1px #000;
    }
    There's your problem.

    Add #mainnav ul li before a:active.

  7. #7
    SitePoint Enthusiast jejcorbett's Avatar
    Join Date
    Apr 2010
    Location
    Brisbane, Australia
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Awesome.

    Thanks you so much!


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
  •