View Full Version : Problem with css code hover button (new)

05-12-2010, 11:17 AM
Hey guys this is my first post =D

Im having problems with my hover button, the problem is i can make one hover button change image but when i try to with one below it doesnt work im thinking its because i havnt ended the one before but im only 3 days new with the whoel css code and stuff
here is my webpage with hover button problem:http://uniquestyleanddesign.webs.com/
the home button changes but the photos one doesnt?? here is the css code i have put in to make them hover

#homebutton:hover { background-image: url("http://farm4.static.flickr.com/3053/4596753027_c68776521e_o.jpg");

#photos:hover { background-image: url("http://farm4.static.flickr.com/3053/4596753027_c68776521e_o.jpg")

all help is very much appreciated:thumbsup:

05-12-2010, 12:08 PM
The best thing would be to add a class 'rollover_buttons' to achieve this rather than doing by the 'id' fields.
.rollover_buttons:hover{ background-image: url("http://farm4.static.flickr.com/3053/4596753027_c68776521e_o.jpg");}

And then put class="rollover_buttons" beside the id field of your buttons/links.

Also in your css, i couldnt find the line with

#photos:hover { background-image: url("http://farm4.static.flickr.com/3053/4596753027_c68776521e_o.jpg")}

Thats why hover on 'photos' button and other buttons aren't working.

05-12-2010, 12:21 PM
this probally sounds like a dumb question but where do i put

.rollover_buttons:hover{ background-image: url("http://farm4.static.flickr.com/3053/4596753027_c68776521e_o.jpg");}

and also what does =class mean ( im really sorry for the silly questions but im trying to learn and im not to good so far lol )

here is a screenshot of where ive put the text ( its a wierd sorta way cause of web.com)


05-12-2010, 12:30 PM
i figured it out my } key wosnt working lol sorry for the hassle but thank u very much for the help mate the )} makes it work now thank u again =D