Check out this fiddle where I have three divs with a border-width of 2px. Originally, the issue was that each div's border gets duplicated in between, resulting in a total border-width of 4px. To solve this, I applied a margin-top of -2px to each div, causing them to cover up the border of the one above and creating an appearance of even borders all around.
I decided to add a hover effect to my divs by using the following CSS:
#main div:hover {
border-color: #09C;
}
The problem now is that since the borders of the top two divs are covered by the ones below, the hover effect doesn't look correct (the bottom border of each div seems to be missing).
My goal is to only have a 2px border between each div while applying a hover effect for the entire border of that div. How can I achieve this?