Javascript in Modern Web Design
// September 2nd, 2008 // No Comments » // Scripts
This is the blog & portfolio of Gio Gutierrez, a web designer located in Miami, Florida, specializing in clean, attractive, user friendly design. Browse around to see my work or follow my thoughts that skews towards the geeky stuff. Nice to meet you & thanks for stopping by!
// September 2nd, 2008 // No Comments » // Scripts
// May 21st, 2008 // No Comments » // Scripts
// August 15th, 2007 // No Comments » // Design, Scripts
All that is requied is the visible height and widht of the visible area and set the display to block to ensure the dimensions are respected. Note also that the text is indented using a huge negative value. This ensures that the link does not show, unless the style sheet is turned off in which case, the user would not see the image, but a clickable text link. One gotcha to be aware is that Firefox will currently outline links when they are clicked placing a thin border around them. While not usually a problem with standard links, if a link has a negative value, this is going to look whack. So we have a css that turns outlines off for all link states by utilizing the outline property.
<a href=”#” class=”rollover”>Test Link</a>
/* Rollover class */
a {outline:none;}
.rollover { display:block width:300px; height:208px; background:url(images/prince.jpg) no-repeat; text-indent:-9999px; }
.rollover:hover {background-position:-300px;}