- This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
So I was watching the video tutorial which describes a three state button and I was wondering if this is a best practice?
Are there other good methods with CSS that are good for button skinning?
i think it depends on your coding style and the site you are building. You were probably watching a video on css sprites. They are good because it lowers that amount of images you have to load. Everyone has their own style though
If the button is merely a link you can do something like this. Lets say your button is 200px wide by 30px tall.
If you want 3 states (normal, hover/focused, visited/active) then your sprite image will need all of those states in the same image (vertically stacked). It’s just a case of moving the sprite image (background) dependant upon what state the button it.
.hide { position: absolute; left: -999em; /* this may come in handy */ }
Button Text Will be Hidden, but it’s useful incase CSS isn’t applied
Hope that helps.