Reputation: 668
Im using google chrome and i want that profile text with the background to disappear when i hover over it. but alas it doesn't... i'm sure im doing something fundamentally wrong. please explain
HTML
<body>
<div id ="pictures">
profile
</div>
CSS
#pictures {
height: 100px;
width: 200px;
display: block;
background-color:#FCC;
}
#pictures:hover {
display: none;
}
Upvotes: 0
Views: 56
Reputation: 228182
You'd be better off using opacity: 0
to avoid any weirdness (as already explained by Danjah).
#pictures:hover {
opacity: 0;
filter: alpha(opacity=0);
}
Upvotes: 5
Reputation: 3059
If you hover over the #pictures
element, it is then removed, therefore you are no longer hovering over it. In Firefox I see a flicker, in Chrome, perhaps the flicker is so fast you don't see it disappear only to reappear again.
Upvotes: 1