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 Coder
    Join Date
    Oct 2006
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    CSS Rollovers and SEO

    Hi,

    I have a client that would like to use images for links, with rollover states. The way that I usually do this is by using "Pixy" style rollovers, where I combine two images into one and then just switch the background position using CSS. However, it would seem this isn't as good for SEO as I wouldn't get to use an alt tag. Would you recommend using javascript and separate images for the rollovers to gain the advantage of alt tags?

  • #2
    Senior Coder
    Join Date
    Oct 2005
    Posts
    1,340
    Thanks
    0
    Thanked 61 Times in 60 Posts
    I would recommend having content worth of seo and not worry about anything else. Google would ignore this anyway, or at least consider it trivial.

  • #3
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,863
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    If your anchors have display:block; style, then you could add the link text inside your anchor tags as normal and then apply a big negative text-indent, say
    Code:
    a.mylinks{
    display:block;
    ...........
    text-indent:-999px;
    }
    Code:
    <a href="mypage.html" class"mylinks">My Page</a>
    , which would optimise to an extend.

    PS: Your menu may create some accessibility issues for those who have "blocked the images"/"no way to get images"
    Last edited by abduraooft; 04-10-2009 at 03:34 PM.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Posting Permissions

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