Reputation: 59
I have an div element width 100px and height 100px. And inside of it i have another element width 100px and height 80px with border which I make disappear on hover but i need it to disappear on hover at the parent element, so also on the 20px below. I hope my question is clear ^^
Parent div:
.whilelist
{
display: block;
float: right;
width: 226px;
height: 210px;
margin-left: 5px;
margin-bottom: 10px;
border-style: solid;
border-width: 3px;
border-color: white;
padding-top: 3px;
padding-left: 3px;
padding-right: 3px;
text-align: center;
}
.whilelist:hover
{
border-style: solid;
border-width: 3px;
border-color: #C0C0C0;
}
And inside:
.whilebilder
{
width: 220px;
height: 180px;
border-style: solid;
border-width: 1px;
border-color: #C0C0C0;
padding-left: 2px;
padding-right: 2px;
}
.whilebilder:hover
{
border-style: solid;
border-width: 1px;
border-color: white;
}
Upvotes: 0
Views: 1830
Reputation: 38262
Try the action in the parent:hover
. Some like:
.whilelist:hover .whilebilder {
display: none;
}
The demo http://jsfiddle.net/ghpDb/3/
Upvotes: 2
Reputation: 109
Here is the way to do it with JQuery.
$('.class1').mouseleave(function () {
$('#text-wrapper').hide();
});
$('.class1').mouseenter(function () {
$('#text-wrapper').show();
});
Upvotes: 0