A problem : Iframe + CSS + image hover

Hi , folks!
I wasnt here for decades …lol :blush:

I have one problem lately and I couldnt resolve by my own because I did work too much with Iframes ( ever) .

Here’s a thing :

I have image in iframe(s) and I wanted to make some hover over them like I’m doing over links (A:hover) but I figure out that this function dont work for iframes :frowning:

here is za code :

css


.myads		{width:300px; height:250px;}
iframe         {border: 1px solid #ffffff;}
iframe a      {border: 1px solid #333;}
iframe a:hover {border: 1px solid #FF0000;}

html


<div class="myads"><iframe
 src="website.com/banner_ads/baner-ads.php"
 marginheight="0" marginwidth="0"
 style="margin: 0pt; text-align: center;" frameborder="0"
 height="255" scrolling="no" width="305"></iframe></div>


If this is impossible then can I at least to make hover for Iframe ? :confused:

Thank you on all for help !

I don’t think you can set styles like this on content pulled from elsewhere. But I’m not sure what you want to do, really.

What do you mean? You could create a hover effect on the containing div, perhaps. Describe more what you want to happen.

Well, I wanted hover effect on Iframe border(s) but nothing happened :frowning:
I tried almost everything but still didint work .

and I rearly use Iframe so , i’m total n00b about his , really …

Just put the hover effect on the containing div.

.myads {
  width:300px; height:250px;
  border: 1px solid #333;
}

.myads:hover {
  border: border: 1px solid #FF0000;
}

If you want the extra while border, put another “container” div around the whole lot:

.container {
  border: 1px solid #ffffff;
}

Thanks ,I resolved the problem :slight_smile: