Check out this link: http://jsfiddle.net/2hDB9/
I'm trying to achieve the following effect:
- When hovering over
Line 1
, only the border ofLine 1
should show. - If you hover over
Line 2
, only the border ofLine 2
should be displayed, not both at the same time.
Here is the HTML structure:
<div class="container">
<div class="box">
Line 1.
<div class="box">
Line 2.
</div>
</div>
</div>
These are the CSS styles applied:
.container {
width: 500px;
}
.box {
padding: 12px;
border: 1px solid grey;
}
.box:hover {
border-color: red;
}