July 9, 200818 yr So another interesting thread from across the pond I have a client who has four images going across the screen. When the user rollsover them I want the images to disappear and four word to appear in their place (one at a time as the mouse goes over each one). I know there is a way to do a CSS Rollover, but before I dive into trying to tailor make one base on one I find on Internet, I thought I'd ask if anyone has an particular ideas how to do exactly what I want in CSS. Thanks! -Seth
July 9, 200818 yr You could have each each image as a background image to a <a> tag and hide the text according to the hover state. In code a { display:block; height:whatever px; width:whatever px; background: url (path/to/your/image); text-indent:-5000px; } a:hover { background:none; text-indent:0; }
July 9, 200818 yr You could have each each image as a background image to a <a> tag and hide the text according to the hover state. Nice one ElanMan *you can even create some animation effect with JQuery * (no javascript would default to the css solution from ElanMan)
July 10, 200818 yr Author but what if i wanted to go between two images and not between image and text?
July 10, 200818 yr but what if i wanted to go between two images and not between image and text? Just have a new background image for the hover state: a:hover { background: url (path/to/your/image); } You can also have both the 'on' and 'off' states in the same image file and use CSS to reference the appropriate part for each state using the 'background-position:' property (the so-called 'CSS Sprites' technique). James
Create an account or sign in to comment