Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Help with Rollover Buttons
Old 04-15-2010, 07:23 PM Help with Rollover Buttons
Skilled Talker

Posts: 90
Trades: 0
I have a image I want to use as a rollover image by shifting the image up while the user hovers over it.

The code I have so far is below. The image shows up I just can't get the rollover effect to work.

HTML
<li>
<div class="box_label" id="trophy-whitetail-news_label"></div>
<div class="box_image" id="trophy-whitetail-news_image"></div>
<div class="box_text" id="trophy-whitetail-news_text">
<p><b>Trophy Whitetail News</b></p>
<p>Sign up for news on topics such as Whitetail Nutrition, Hunting Tactics, Hunting Gear and Promotions.</p>
<a class="box_btn" id="trophy-whitetail-news_btn" href="timberghost-coupons.html" target="_blank">Sign Up Today</a>
</div>
</li>
CSS
#hp_boxes #trophy-whitetail-news_btn {
background: url(images/trophy-whitetail-news_btn.png) no-repeat;
width: 130px;
height: 28px;
display: block;
text-indent: -99999px;
}

.box_btn:hover{
background-position: 0 -28px;
}
Here is a link to the page.. TimberghostShop

The links in question are the three buttons in the three boxes below the rotating banner ad.

I have been scrutinizing this thing for a couple of hours now. My patience has run out.

Any help is appreciated.

Josh

Last edited by Shadrach; 04-16-2010 at 10:20 AM..
Shadrach is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-16-2010, 08:31 AM Re: Help with Rollover Buttons
Super Talker

Posts: 142
Name: William
Trades: 0
Its cause you only put 0 -28px
you would need to put 0px -28px 0px 0px
as what you told it was (if i am correct...) left and right = 0px top and bottom = -28px
UUilliam is offline
Reply With Quote
View Public Profile
 
Old 04-16-2010, 08:37 AM Re: Help with Rollover Buttons
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,376
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
http://www.webmaster-talk.com/css-fo...ml#post1010275
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-16-2010, 10:19 AM Re: Help with Rollover Buttons
Skilled Talker

Posts: 90
Trades: 0
Thanks for the replies guys but neither of these really offer any further insight.

The background-position property is different from other CSS properties such as padding or margin in that background-position is defining the position of the background and only needs two inputs: an x value and a y value.

I thought surely that as long as I had looked at this that there was some simple syntax error to blame.

If anyone sees my error please let me know.

Thanks,
Josh
Shadrach is offline
Reply With Quote
View Public Profile
 
Old 04-23-2010, 08:50 AM Re: Help with Rollover Buttons
Skilled Talker

Posts: 90
Trades: 0
Bump.. Still having problems.

Chris, I followed the link you gave but it didn't really offer much help as far as the code syntax goes. Is there anything wrong with the code I have listed?

Josh
Shadrach is offline
Reply With Quote
View Public Profile
 
Old 04-23-2010, 01:11 PM Re: Help with Rollover Buttons
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,376
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Code:
.popup {
      background-position: center 50px;
}
.popup:hover {
      background-position: center top;
}
Then anything with a class of "popup" applied will have a background that "jumps" up 50 pixels on hover.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Help with Rollover Buttons
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.22686 seconds with 12 queries