Rollovers/Hovers |
Rollovers/Hovers |
Jul 2 2009, 06:08 PM
Post
#1
|
|
|
Member ![]() ![]() Group: Member Posts: 25 Joined: Jun 2009 Member No: 733,596 |
Ok,I finished my div and was gone leave it as is but wanted to try something different this time, so I am interested in learning how to do the rollovers/hovers
My test profile is here So, how can I achieve this? "Design Wise" Will I have to recreate/extend the top part of my div to make this happen? I mean can I leave my div as is?? Or will I have to create something I read about two images or a top half and bottom or something....I would like the links to change and also where it says click here for pricing..... like this profile here I've read so many different things till I got confused as how to try and achieve this... Which code should I use or which is easier to deal with? #1 http://www.createblog.com/html_css-scripts...image-rollover/ #2 CODE <style> .nav1 { display:block;color:ffffff!important; text-align:right!important; font-family:georgia!important; font-size:7pt!important; line-height:10pt!important; background-color:202020!important; margin: 1px!important; border-left:3px solid!important; border-right:0px solid!important; border-color:7f292f!important; letter-spacing: 4px!important; font-weight: normal!important; width:100%!important; margin: 1px!important; border-left:3px solid!important; border-right:0px solid!important; border-color:7f292f!important; text-transform:uppercase!important; text-decoration:none!important; line-height:10pt!important; background-color:202020!important; } .nav1:hover { display:block;color:ffffff!important; font-family:georgia!important; text-transform:uppercase!important; text-decoration:none!important; line-height: 10pt!important; overflow-x:hidden!important; font-size:7pt!important; background-color:2d2d2d!important; margin: 1px!important; border-left:3px solid!important; border-right:0px solid!important; border-color: a8545a!important; text-align:right;!important letter-spacing: 4px!important; font-weight: normal!important; width:100%!important; } </style> CODE <a href="URL HERE!!" class="nav1">Friend #3</a> #3 CODE .navigation { NAVIGATION PROPERTIES } .navigation a { display:block; float:left; height:##px; text-indent:-999em; } .navigation a:hover { background-position:bottom; } .link-1 { background-image:url(IMAGE FOR 1ST LINK); width:##px; } .link-2 { background-image:url(IMAGE FOR 2ND LINK); width:##px; } .link-3 { background-image:url(IMAGE FOR 3RD LINK); width:##px; } CODE <div class="navigation">
<a class="link-1" href="URL">LINK 1</a> <a class="link-2" href="URL">LINK 2</a> <a class="link-3" href="URL">LINK 3</a> </div> |
|
|
|
![]() |
Jul 2 2009, 09:32 PM
Post
#2
|
|
![]() Mel Blanc was allergic to carrots. ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Designer Posts: 6,371 Joined: Aug 2008 Member No: 676,291 |
When you make the class for the rollover, you need to set it's height to half of the image's height. Then, use the a tag with a class property to it within a DIV.
So, make your class in your CSS: CODE .CLASS_NAME {display:block; width:###px; height:###px; background-image: url("IMAGE URL"); background-position:top left; background-repeat:no-repeat;} .CLASS_NAME:hover {display:block; width:###px; height:###px; background-image: url("IMAGE URL"); background-position:bottom left; background-repeat:no-repeat;} Then, input the DIV into your HTML: CODE <div style="position:absolute; top:###px; _top:###px; left:50%; _left:50%; margin-left:###px; _margin-left:###px;"> <a class="CLASS_NAME" href="URL" target="_self"> </div> Replace the pound symbols and little fillers with the appropiate values. |
|
|
|
dezignx Rollovers/Hovers Jul 2 2009, 06:08 PM
hermes is that a 2.0 profile or 1.0 Jul 2 2009, 08:00 PM
dezignx its a 1.0 profile Jul 2 2009, 08:12 PM
Mikeplyts Try using the first tutorial you posted since you... Jul 2 2009, 08:19 PM
hermes i don't think you are going to be able to use ... Jul 2 2009, 08:21 PM
Mikeplyts QUOTE(hermes @ Jul 2 2009, 09:21 PM) i do... Jul 2 2009, 08:24 PM
dezignx Yep exactly...so I will have to create another ima... Jul 2 2009, 08:22 PM
hermes what mike said works..
and yes you can leave it li... Jul 2 2009, 08:25 PM
Mikeplyts QUOTE(hermes @ Jul 2 2009, 09:25 PM) what... Jul 2 2009, 08:33 PM
dezignx Ok, I will edit my layout.
To clarify, am I makin... Jul 2 2009, 08:33 PM
Mikeplyts QUOTE(dezignx @ Jul 2 2009, 09:33 PM) Ok,... Jul 2 2009, 08:34 PM
dezignx Ok good...Im going try this out..will post back wh... Jul 2 2009, 08:37 PM
dezignx Ok, I created my two message buttons and put the u... Jul 2 2009, 09:26 PM
dezignx I'm doing something wrong....
ABOUT ME
CODE... Jul 2 2009, 09:45 PM
Mikeplyts Replace your codes with this:
About Me:
CODE<s... Jul 2 2009, 10:32 PM
dezignx Thanks
Just had to do minor tweaking to get my ... Jul 3 2009, 08:57 AM![]() ![]() |