February 28, 200917 yr Evening, Ok I have five images i'm using as "buttons" I want to the image to change on rollover, whats the cleanest way to do this by doing a list using li?
February 28, 200917 yr Author ok I went for a css rollover however I can't get the "home" or "contact" buttons to work... they are visable but don't change state... <div id="navigation"> <ul> <li class="home"><a href="#">Home</a></li> <li class="gallery"><a href="#">Gallery</a></li> <li class="about"><a href="#">About</a></li> <li class="services"><a href="#">Services</a></li> <li class="Contact"><a href="#">Contact</a></li> </ul> </div> CSS #navigation ul { width: 682px; height: 51px; position: absolute; /** Places image at the top of the page **/ top: 100px; /** Determines the height from the top of the page **/ left: 100px; /** Determines the width from the left of the page **/ background: url(menu.jpg) no-repeat 0 0; list-style: none; margin: 0; padding: 0; } #navigation li { display: inline; } #navigation li a:link, #navigation li a:visited { border: none; width: 136px; /** width of the button in active state **/ height: 51px; /** height of the button in active state **/ display: block; position: absolute; top: 0; text-indent: -7000px; /** Removes li text from the screen **/ outline: none; } #navigation li.home a:link, #navigation li.home a:visited { left: 0; } #navigation li.gallery a:link, #navigation li.gallery a:visited { left: 136px /** how many px left of the first button i.e blue **/ } #navigation li.about a:link, #navigation li.about a:visited { left: 272px /** how many px left of the first button i.e blue **/ } #navigation li.services a:link, #navigation li.services a:visited { left: 410px /** how many px left of the first button i.e blue **/ } #navigation li.contact a:link, #navigation li.contact a:visited { left: 546px /** how many px left of the first button i.e blue **/ } #navigation li.home a:hover { background: url(menu.jpg) no-repeat 0 -51px; /** moves image up 30px showing the rollover states **/ } #navigation li.gallery a:hover { background: url(menu.jpg) no-repeat -136px -51px; /** moves image up 30px and right 80px showing the rollover states **/ } #navigation li.about a:hover { background: url(menu.jpg) no-repeat -272px -51px; } #navigation li.services a:hover { background: url(menu.jpg) no-repeat -410px -51px; } #navigation li.contact a:hover { background: url(menu.jpg) no-repeat -546px -51px; } Can anyone see what is wrong??? please help???
February 28, 200917 yr Got a link? <li class="Contact"> Change the C to lowerclass, dunno if it matters, but it was the first thing i noticed >.< It looks ok to me? You've cleared your cache to be sure right?
Create an account or sign in to comment