Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

How to Make an Image Rollover in CSS and Adobe Illustrator

Loading...

Sign in or sign up now!
12,406
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Dec 1, 2008

This quick tutorial shows you basic steps to create a rollover button in Adobe Illustrator and then code it in HTML and CSS. http://webdizeo.com

Category:

Howto & Style

Tags:

License:

Standard YouTube License

  • likes, 2 dislikes

Link to this comment:

Share to:

Uploader Comments (kangomedia)

  • Hey, can you add an active state to an image? Basically, I want the rollover to stick until another link is clicked.

    Here is my code that I tried:

    a.sign3{ display:block; width:156px; height:55px; text-indent:-5000px; text-decoration:none; background-image: url(../images/signs/3.png);

    }

    a:hover.sign3{ background-position:-156px 0; background-image: url(../images/signs/3ro.png);

    }

    a:active.sign3{ background-position:-156px 0; background-image: url(../images/signs/3ro.png);

    }

    Thanks!

  • @teamcastanedas @teamcastanedas @teamcastanedas I would recommend adding a class of "current" or "active" to the menu items. So, for example, you might have:

    a:hover.sign3, a.sign3.current {background-position:-156px 0; background-image: url(../images/signs/3ro.png);}

    Now your hyperlink must have the "current" class too.

    Hope that helps.

    - Freddy

  • This is PERFECT. Exactly what I was looking for and it worked perfectly. Thanks so much man.

  • @bruceaisher no prob man. anything i can do to help. 

  • ive been learning html code and i must say i found this fairly useful in creating a test site

  • @terrcraft18 Thanks. I appreciate it.

see all

All Comments (25)

Sign In or Sign Up now to post a comment!
  • Thank you man, it helps me a lot!! Nice vid, simple and effective !

  • it works with firefox, but at chrome it display only the text "home" with decoration also

  • @TheSxNxP Surely you have solved the problem by now but I want to comment to help others. If you copy the HTML straight from the website you get a lot of additional junk that you dont need. You can clean the code by using firebug, you can check and edit in browser. Or code it manually. Or use a html scrubber.

  • I am I just cant seem to get this to work Ive done every this right down to the from the code to the image I just cant seem to get this to work if anybody has any ideas please help

Loading...

0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more