I m using a image change on hover for a button. I m using repeat-x property for the hover image whenever i hover the button, i m getting a white background. the code i m using is as follows
.btn_action{background:url(../images/normal_btnbg.png) repeat-x;height:20px;margin:0 5px 0 0;cursor:pointer;border:1px solid #31659c;color:#ffffff;width:auto;font-size:12px;padding:0 3px 3px 3px ;}
.btn_action:hover{ background:url(../images/active_btnbg.png) repeat-x top left;}
btn_action is the class name for my button.
is there anything i can do with my code? i m not sure of where the exact problem is
CSS hover imageimage getting white on loading
Page 1 of 1
2 Replies - 1244 Views - Last Post: 04 January 2011 - 08:41 AM
Replies To: CSS hover image
#2
Re: CSS hover image
Posted 28 December 2010 - 06:41 AM
Can you please post your code inside code tags along with the relevant HTML as well. It would be more helpful to look into it that way.
Thanks
Thanks
#3
Re: CSS hover image
Posted 04 January 2011 - 08:41 AM
Did you check to see if your image is in the right idrectory or the code in your CSS is poiting to the right folder
Example:
And second your CSS is wrong the url to your image should be contained in 's
like so...
If the first solution does not fix your error try putting the image you are using in the same folder as the css file and use
Example:
background:url(../images/normal_btnbg.png)
And second your CSS is wrong the url to your image should be contained in 's
like so...
background:url('../images/normal_btnbg.png')
If the first solution does not fix your error try putting the image you are using in the same folder as the css file and use
background:url('normal_btnbg.png')
Page 1 of 1

New Topic/Question
Reply



MultiQuote



|