Css Rollovers? |
Css Rollovers? |
![]()
Post
#1
|
|
Member ![]() ![]() Group: Member Posts: 12 Joined: Aug 2009 Member No: 741,528 ![]() |
How can i do that?
|
|
|
![]() |
![]()
Post
#2
|
|
![]() Treasure Pleasure ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Head Staff Posts: 11,193 Joined: Oct 2005 Member No: 281,127 ![]() |
Follow this tutorial then use this code whenever you want to have a link with rollovers:
CODE <a href="URL" class="NAME">LINK</a> Replace URL with the url of the page that you want to link, NAME with the name of your designated rollover's class, and LINK with what you want to set as a link (ie. an image, text, etc). |
|
|
![]()
Post
#3
|
|
Blazed ![]() ![]() ![]() ![]() Group: Member Posts: 294 Joined: Jun 2009 Member No: 732,840 ![]() |
maynne was just about to post that ahahaha
|
|
|
![]()
Post
#4
|
|
Member ![]() ![]() Group: Member Posts: 12 Joined: Aug 2009 Member No: 741,528 ![]() |
Can I put these in DIV's?
|
|
|
![]()
Post
#5
|
|
Blazed ![]() ![]() ![]() ![]() Group: Member Posts: 294 Joined: Jun 2009 Member No: 732,840 ![]() |
Yes
|
|
|
![]()
Post
#6
|
|
Member ![]() ![]() Group: Member Posts: 12 Joined: Aug 2009 Member No: 741,528 ![]() |
Okay. Followed the tutorial. Set my images, classes, everything, up.
What exactly do I put in the DIV to make it the image rollover? |
|
|
![]()
Post
#7
|
|
Member ![]() ![]() Group: Member Posts: 12 Joined: Aug 2009 Member No: 741,528 ![]() |
I'm being really dumb about this. haha.
So for LINK do I actually add an image there? Because I did. and It just linked that image but didn't rollover. |
|
|
![]()
Post
#8
|
|
![]() Treasure Pleasure ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Head Staff Posts: 11,193 Joined: Oct 2005 Member No: 281,127 ![]() |
Do you mind posting all your codes and a link to the page you're testing this on?
|
|
|
![]()
Post
#9
|
|
![]() Mel Blanc was allergic to carrots. ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Designer Posts: 6,371 Joined: Aug 2008 Member No: 676,291 ![]() |
You should try using this tutorial. It can prevent the blink effect too.
|
|
|
![]()
Post
#10
|
|
Member ![]() ![]() Group: Member Posts: 12 Joined: Aug 2009 Member No: 741,528 ![]() |
CODE <style>
a.twitter {float:left;background:url(http://i25.tinypic.com/xdecno.jpg)repeat;width:30px;height:40px;display:block;} a.twitter:hover {float:left;background:url(http://i30.tinypic.com/25hq36f.jpg)repeat;} </style> <div class="codytwitter" style=" position: absolute; top: 1540px; width: 30px; height: 40px; left: 50%; margin-left: -404px ! important; background-color: transparent;"><a href="http://www.twitter.com" class="twitter"><img src="http://i25.tinypic.com/xdecno.jpg" /></a> </div> |
|
|
![]()
Post
#11
|
|
![]() Treasure Pleasure ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Head Staff Posts: 11,193 Joined: Oct 2005 Member No: 281,127 ![]() |
Replace your codes with this:
CODE <style> a.twitter {float:left;background:url("http://i25.tinypic.com/xdecno.jpg")repeat;width:30px;height:40px;display:block;} a.twitter:hover {float:left;background:url("http://i30.tinypic.com/25hq36f.jpg")repeat;} </style> <div class="codytwitter" style="position: absolute; top: 1540px; width: 30px; height: 40px; left: 50%; margin-left: -404px!important; background-color: transparent;"><a href="http://www.msplinks.com/MDFodHRwOi8vd3d3LnR3aXR0ZXIuY29t" class="twitter"></a> </div> Then next time you want to put up a rollover link, leave the image out like this: CODE <a href="URL" class="NAME"></a> That should do the trick. Sorry about that. |
|
|
![]()
Post
#12
|
|
Member ![]() ![]() Group: Member Posts: 12 Joined: Aug 2009 Member No: 741,528 ![]() |
Perfect man!
It doesn't work in IE though. There's no images. |
|
|
![]()
Post
#13
|
|
![]() Treasure Pleasure ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Head Staff Posts: 11,193 Joined: Oct 2005 Member No: 281,127 ![]() |
Right, replace it with this:
CODE <style> a.twitter {float:left; background-image:url("http://i25.tinypic.com/xdecno.jpg"); background-repeat:repeat; width:30px; height:40px; display:block;} a.twitter:hover {float:left; background-image:url("http://i30.tinypic.com/25hq36f.jpg"); background-repeat:repeat;} </style> <div class="codytwitter" style="position: absolute; top: 1540px; width: 30px; height: 40px; left: 50%; margin-left: -404px!important; background-color: transparent;"><a href="http://www.msplinks.com/MDFodHRwOi8vd3d3LnR3aXR0ZXIuY29t" class="twitter"></a> </div> Just duplicate that stylesheet and edit it if you need more rollovers. |
|
|
![]()
Post
#14
|
|
Member ![]() ![]() Group: Member Posts: 12 Joined: Aug 2009 Member No: 741,528 ![]() |
Beautiful.
Thanks man :) |
|
|
![]()
Post
#15
|
|
![]() Senior Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Administrator Posts: 8,629 Joined: Jan 2007 Member No: 498,468 ![]() |
Topic Closed and Moved
|
|
|
![]() ![]() |