sidorak95
01-13-2009, 07:41 PM
Well, I'm trying to create a rollover button with just CSS and HTML, no Javascript. Problem is, when I hover my mouse on it, the button image disappears and no graphic takes is place. You can see where I am here (http://www.fungamesuniverse.com/test). Problem is, I really have no idea what I'm doing. Some help is appreciated.
HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=windows-1252" http-equiv="Content-Type" />
<title>FunGamesUniverse - Where the Fun Begins! </title>
<link href="teststyle.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="logo">
<img alt="Logo" height="150" src="Logotry.png" width="500" />
</div>
<div class="home">
<a href="http://fungamesuniverse.com" title="Home">
<img src="Homeoff.png" alt="Home" />
</a>
</div>
</body>
</html>
CSS Stylesheet:
body
{
background-color:black
}
div.logo {
width: 500px;
margin: 25px auto;
}
.home {
position: relative;
font-family: arial, helvetica, sans-serif;
background: url(Homeon.png) no-repeat;
white-space: nowrap;
display: block;
margin: 0px;
padding: 0px;
}
.home a {
display: block;
color: #000;
font-size: 11px;
float: left;
text-decoration: none;
}
.home img { border: 0; }
* html a:hover {visibility:visible}
.home a:hover img{visibility:hidden}
.home span {
position: absolute;
left: 35px;
top: 15px;
margin: 0px;
padding: 0px;
cursor: pointer;
}
HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=windows-1252" http-equiv="Content-Type" />
<title>FunGamesUniverse - Where the Fun Begins! </title>
<link href="teststyle.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="logo">
<img alt="Logo" height="150" src="Logotry.png" width="500" />
</div>
<div class="home">
<a href="http://fungamesuniverse.com" title="Home">
<img src="Homeoff.png" alt="Home" />
</a>
</div>
</body>
</html>
CSS Stylesheet:
body
{
background-color:black
}
div.logo {
width: 500px;
margin: 25px auto;
}
.home {
position: relative;
font-family: arial, helvetica, sans-serif;
background: url(Homeon.png) no-repeat;
white-space: nowrap;
display: block;
margin: 0px;
padding: 0px;
}
.home a {
display: block;
color: #000;
font-size: 11px;
float: left;
text-decoration: none;
}
.home img { border: 0; }
* html a:hover {visibility:visible}
.home a:hover img{visibility:hidden}
.home span {
position: absolute;
left: 35px;
top: 15px;
margin: 0px;
padding: 0px;
cursor: pointer;
}