H
Helpful person
I'm fairly new to html but learning fast. I am presently trying to
find the best way to perform an image rollover for a link. In
http://www.htmldog.com/articles/rollovers/
they suggest putting both images in the same jpg file and adjusting
the alignment. This is shown in
http://www.htmldog.com/examples/rollovers1.html
The source code is
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Rollovers 1</title>
<style type="text/css" media="all">
body {
font: 12px arial, helvetica, sans-serif;
}
a {
display: block;
width: 200px;
height: 63px;
background-image: url(images/toucancombo.jpg);
text-indent: -999em;
}
a:hover {
background-position: bottom;
}
</style>
</head>
<body>
<p><a href="#">Toucan</a></p>
</body>
</html>
I am having trouble understanding the line text-indent -999em
Can someone please explain this to me?
I like this method because no JavaScript is used for the rollover.
What is the general opinion of using this method?
find the best way to perform an image rollover for a link. In
http://www.htmldog.com/articles/rollovers/
they suggest putting both images in the same jpg file and adjusting
the alignment. This is shown in
http://www.htmldog.com/examples/rollovers1.html
The source code is
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Rollovers 1</title>
<style type="text/css" media="all">
body {
font: 12px arial, helvetica, sans-serif;
}
a {
display: block;
width: 200px;
height: 63px;
background-image: url(images/toucancombo.jpg);
text-indent: -999em;
}
a:hover {
background-position: bottom;
}
</style>
</head>
<body>
<p><a href="#">Toucan</a></p>
</body>
</html>
I am having trouble understanding the line text-indent -999em
Can someone please explain this to me?
I like this method because no JavaScript is used for the rollover.
What is the general opinion of using this method?