ScrewLooseSalad Posted May 7, 2013 Share Posted May 7, 2013 I really cannot understand it, I've tried several different ways of writing it that I'm sure I've used before, and I simply cannot get :hover to work with any of my divs... html: <a href=''><div id='menu' class='button1'></div></a> <a href=''><div id='menu' class='button2'></div></a> <a href=''><div id='menu' class='button3'></div></a> <a href=''><div id='menu' class='button4'></div></a> css: #menu { width:75px; height:75px; background-color:red; /* background-image:url('menu.jpg'); */ float:left; margin:20px; } .button1:hover { /* background-position:75px 75px; */ background-color:yellow; } as you can see I've commented out the image, ultimately I want the image to appear, but for now I can't get the :hover to change the state of the div at all, no reaction... any help would be much appreciated, its really frustrating me... Link to comment https://forums.phpfreaks.com/topic/277744-i-cannot-get-css-hover-to-work/ Share on other sites More sharing options...
DarkKnight2011 Posted May 7, 2013 Share Posted May 7, 2013 As far as I know, you cannot use the same id more than once, that could be throwing an error an causing your issue, they could all have the class menu, and the id's can be button1, button2 etc Link to comment https://forums.phpfreaks.com/topic/277744-i-cannot-get-css-hover-to-work/#findComment-1428822 Share on other sites More sharing options...
ScrewLooseSalad Posted May 7, 2013 Author Share Posted May 7, 2013 that's just it! thanks! Link to comment https://forums.phpfreaks.com/topic/277744-i-cannot-get-css-hover-to-work/#findComment-1428838 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.