CSS hover image

image getting white on loading

Page 1 of 1

2 Replies - 1061 Views - Last Post: 04 January 2011 - 08:41 AM

#1 teddy153  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 20-December 10

CSS hover image

Posted 28 December 2010 - 06:31 AM

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

Is This A Good Question/Topic? 0
  • +

Replies To: CSS hover image

#2 singularity  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 17
  • View blog
  • Posts: 184
  • Joined: 17-October 08

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.

Was This Post Helpful? 1
  • +
  • -

#3 Sadin56  Icon User is offline

  • D.I.C Head

Reputation: 12
  • View blog
  • Posts: 183
  • Joined: 19-December 10

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


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


Was This Post Helpful? 0
  • +
  • -

Page 1 of 1