Posts: 24
Location: bottom right corner of right palm
|
I have a website that uses image rollovers. The background imagess in each cell of a table have a Hover image that is the same but darker and with text in it.
I am trying to simplify the website so future webmasters (or me) will be able to change the hover text without the need of Photoshop.
The ideal method that would work would be to have the background cell image loaded by CSS and then have a hover layer for Text which would be in the HTML file. The text would have an Opacity so that the background image would appear darker.
Browser use is static. I have no worries of NN, mozilla, Opera compatibility.
The following is something I found online. I have not been able to get the background image to show.
I was hoping CSS could load the images instead of having the img src= in the html code. A lot of this is letter for letter but I was hoping at least the image would show.
Code:
.descr {
position: relative;
font-family: arial, verdana, helvetica, sans-serif;
background-image: url(/images/picture.jpg);
background-repeat: no-repeat;
width: 181px;
height: 122px;
margin: 0;
margin-bottom: 0px;
padding:0;
}
.descr a {
display: block;
font-size: 14px;
width: 161px;
height: 101px;
display: block;
margin: 0;
padding: 0;
color: white;
text-decoration: none;
}
.descr img {width: 100%; height: 100%; border: 0; }
.discr a:hover {visibility: hidden}
.descr a:hover img {visibility: visible}
|