Change overlay image and text colour when hovering on background image link
Posted: 09 October 2010 01:27 PM   [ Ignore ]
Newbie
Rank
Total Posts:  1
Joined  2010-10-09

Hi. Really hoping someone can help me with this

Basically I’ve got a page containing a block of 9 images, with each linking to a video clip. At the moment I’ve got the CSS coded so that whenever the mouse is hovered over the ‘infobar’ (at the bottom of each image) it goes from having a transparent background with black text to having a grey background with white text.

What I’m trying to achieve is that same effect whenever the mouse is hovered over any part of the image and infobar.

An online version of the page is here:
http://www.markmcm.co.uk/test/test.html

The CSS is as as follows:

/*
 *  Page Stylesheet 
 */
body {
  font
-familyArialHelveticasans-serif;
  
background-color#eaeaea;
  
border:0margin:0padding:0;
  
height100%;
}
a
:link {
    text
-decorationnone;
}
a
:visited {
    text
-decorationnone;
}
a
:hover {
    text
-decorationnone;
}
a
:active {
    text
-decorationnone;
}
#container {
    
margin-leftauto;
    
margin-rightauto;
       
min-height100%;
    
width936px;
}
html #container {
    
height100%;
}
#content {
    
float:left;
    
positionrelative;
    
height528px;
    
width936px;
    
z-index0;
}
.miniscreen1, .miniscreen2, .miniscreen3, .miniscreen4, .miniscreen5, .miniscreen6, .miniscreen7, .miniscreen8, .miniscreen9 {
    position
absolute;
    
floatleft;
    
displayblock;
    
width312px;
    
height176px;
}
.miniscreen1 {
    top
0;
    
left0;
}
.miniscreen2 {
    top
:0;
    
left312px;
}
.miniscreen3 {
    top
0;
    
left624px;
}
.miniscreen4 {
    left
0;
    
top:176px;
}
.miniscreen5 {
    left
312px;
    
top:176px;
}
.miniscreen6 {
    left
624px;
    
top:176px;
}
.miniscreen7 {
    left
0;
    
top:352px;
}
.miniscreen8 {
    left
312px;
    
top:352px;
}
.miniscreen9 {
    left
624px;
    
top:352px;
}
.info {
    height
30px;
    
top:3px;
    
left40px;
    
width265px;
    
floatleft;
    
positionabsolute;
}
.infobar  {
    left
:0px;
    
positionabsolute;
    
top140px;
    
width312px;
    
height36px;
    
outlinenone;
    
color:#000;
    
backgroundurl("data/infobar.png"no-repeat 0 0;
    
z-index650;
}
.infobar:hover  { 
    background
-position-36px;
    
outlinenone;
    
color:#fff;
}
#infobar span {
    
displaynone;
    
outlinenone;
}
.clip_title {
    outline
none;
    
font-size85%;
    
font-weight700;
    
vertical-aligntop;
    
text-alignleft;
}
.clip_sub {
    outline
none;
    
height13px;
    
font-size80%;
    
line-height13px;
    
font-weight700;
    
vertical-aligntop;
    
text-alignleft;

Many thanks in advance.

Profile