Forum Moderators: not2easy
I have some CSS code that I have modified that gets me close but no cigar.
[edited by: alt131 at 2:46 pm (utc) on May 31, 2011]
[edit reason] Thread Tidy - 404 [/edit]
<style type="text/css">
ul {
width: 920px;
height: 325px;
margin: 0;
padding: 0;
/*centre the ul*/
margin: 0 auto;
list-style-type: none;
/* The absolutely positioned spans will take their position from this relatively positioned parent*/
position:relative;
}
li {
/*get the li's horizontal and evenly laid out */
float: left;
margin: 0 10px;
}
a {
/*make a container to hold the images */
display: block;
/*height and width the size of the image you want displayed */
width: 280px;
height: 325px;
border: 1px solid white;
color: #666666;
font-family: Tahoma, Geneva, sans-serif;
font-size: 18px;
/*remove underline*/
text-decoration:none;
}
a:hover {border: 1px solid blue;}
/* The image "swaps" */
/* Method One - */
a.thumbnail-1 {background-image: url(blackandwhite-1.jpg); }
a.thumbnail-2 {background-image: url(blackandwhite-2.jpg);}
a.thumbnail-3 {background-image: url(blackandwhite-3.jpg);}
a.thumbnail-1:hover {background-image: url(coloured-1.jpg);}
a.thumbnail-2:hover {background-image: url(coloured-2.jpg);}
a.thumbnail-3:hover {background-image: url(coloured-3.jpg);}
*/
/*Method two*/
/*
a.thumbnail-1 {background-image: url(bothversions-1.jpg); }
a.thumbnail-2 {background-image: url(bothversions-2.jpg); }
a.thumbnail-3 {background-image: url(bothversions-3.jpg);}
a:hover {background-position: 280px; }
*/
/* The span */
a span {
position: absolute;
visibility:hidden;
}
/* To centre the text in the span give the span a width (this is the same as the ul) then align the text in the centre of the span. Note do this on the hover rather than the span itself to avoid it "overlaying" other elements when hidden*/
a:hover span {
width:920px;
text-align: center;
left:0;
top:380px;
visibility:visible;
z-index: 50;
}
</style>
</head>
<body>
<ul>
<li> <a class="thumbnail-1" href="Residential_Index.htm"><span>RESIDENTIAL</span></a> </li>
<li><a class="thumbnail-2" href="Home_Staging_Index.htm"><span>HOME STAGING</span></a> </li>
<li><a class="thumbnail-3" href="Commercial_Index.htm"><span>COMMERCIAL</span></a></li>
</ul>