First off, I am a newbie to CSS but I am researching it. I have searched many sites and yet to find the answer I am looking for. I am close but not quite there. I have a couple of buttons and I want to have a hover action to change the image to another image. I have found several places for lists but my page is not set up in a list, I have other stuff in between the buttons. The closest I have gotten is to have one image with both buttons and then offset the position. But the code I have found puts the image in the CSS code so it only work for one button. I tried to put the image in the Div but it didn't work...I am sure it is simple to fix, I just haven't figured it out... Here is what I have so far:
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title>Tattoo Home page</title>
<style type="text/css">
body
{ background-image:url('images/sunset.jpg');
background-repeat:no-repeat;
background-attachment:fixed;
background-position:center; }
</style>
<title>Main Page</title>
<style>
a.rollover {
display: block;
width: 150px;
height: 50px;
margin: 0px;
text-decoration: none;
background-image: url(images/tattoobtn.gif);[blue]this is where the image is loaded I want the image to be loaded in the Div or whatever it should be[/blue]
}
a.rollover:hover {
background-position: 0px -50px;
} </style>
</head>
<body
style="color: white; background-color: black; background-image: url(images/sunset.jpg);"
alink="#000099" link="#000099" vlink="#990099">
<div><img src="images/greyribbonsm.gif"
style="width: 142px; height: 15px;" alt="Oriental tattoo"></div> [blue]this is just a graphic that separates the buttons[/blue]
<div><img src="images/dragonart-test.jpg"
style="width: 141px; height: 196px;" alt="">
</div>[blue]this is a logo on the ribbon[/blue]
<div><img src="images/greyribbonsm.gif"
style="width: 142px; height: 15px;" alt="">
</div>[blue]this is just a graphic that separates the buttons[/blue]
<div style="height: 50px;"><a href="#"
class="rollover"> </a>
</div>[blue]This button works because the image was set in the CSS above[/blue]
<div><img src="images/greyribbonsm.gif"
style="width: 142px; height: 15px;" alt="">
</div>[blue]this is just a graphic that separates the buttons[/blue]
<div><img src="images/drclawbtnsm.jpg"
title="who is" style="width: 142px; height: 36px;"alt="">
</div>[blue]This is another button that I need to get working with hover[/blue]
<div><img src="images/greyribbonsm.gif"
style="width: 142px; height: 15px;" alt=""></div>
<div><img src="images/artworkbtnsm.jpg"
title="See some of my artwork"
style="width: 142px; height: 36px;" alt="">
</div>[blue]This is another button that I need to get working with hover[/blue]
<div><img src="images/greyribbonsm.gif"
style="width: 142px; height: 15px;" alt=""></div>
</body>
</html>
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title>Tattoo Home page</title>
<style type="text/css">
body
{ background-image:url('images/sunset.jpg');
background-repeat:no-repeat;
background-attachment:fixed;
background-position:center; }
</style>
<title>Main Page</title>
<style>
a.rollover {
display: block;
width: 150px;
height: 50px;
margin: 0px;
text-decoration: none;
background-image: url(images/tattoobtn.gif);[blue]this is where the image is loaded I want the image to be loaded in the Div or whatever it should be[/blue]
}
a.rollover:hover {
background-position: 0px -50px;
} </style>
</head>
<body
style="color: white; background-color: black; background-image: url(images/sunset.jpg);"
alink="#000099" link="#000099" vlink="#990099">
<div><img src="images/greyribbonsm.gif"
style="width: 142px; height: 15px;" alt="Oriental tattoo"></div> [blue]this is just a graphic that separates the buttons[/blue]
<div><img src="images/dragonart-test.jpg"
style="width: 141px; height: 196px;" alt="">
</div>[blue]this is a logo on the ribbon[/blue]
<div><img src="images/greyribbonsm.gif"
style="width: 142px; height: 15px;" alt="">
</div>[blue]this is just a graphic that separates the buttons[/blue]
<div style="height: 50px;"><a href="#"
class="rollover"> </a>
</div>[blue]This button works because the image was set in the CSS above[/blue]
<div><img src="images/greyribbonsm.gif"
style="width: 142px; height: 15px;" alt="">
</div>[blue]this is just a graphic that separates the buttons[/blue]
<div><img src="images/drclawbtnsm.jpg"
title="who is" style="width: 142px; height: 36px;"alt="">
</div>[blue]This is another button that I need to get working with hover[/blue]
<div><img src="images/greyribbonsm.gif"
style="width: 142px; height: 15px;" alt=""></div>
<div><img src="images/artworkbtnsm.jpg"
title="See some of my artwork"
style="width: 142px; height: 36px;" alt="">
</div>[blue]This is another button that I need to get working with hover[/blue]
<div><img src="images/greyribbonsm.gif"
style="width: 142px; height: 15px;" alt=""></div>
</body>
</html>