Overlapping 1 px Borders making a thicker border

Sam Clark picture Sam Clark · Aug 27, 2012 · Viewed 14.6k times · Source

Is there a way, when I have over lapping (touching) div's, to make the 1px border not become 2 pixels. And I know I could just put a border on 2 of the sides, but then the one edge of the div wouldn't have a border. By the way, I'm using jQuery Masonry.

Answer

Scott Selby picture Scott Selby · Aug 27, 2012

yes the div on the right would look something like this

     border: 1px solid #fff;
     border-left: none;

the second border-left will override the left border that was just put on there

EDIT:

ok, since youre using jQuery masonary - do it like this

            .container {
              width:50px;
              height:80px;
              border:1px solid black;
              margin-right: -1px;
              margin-bottom: -1px;
              }

the overlapping method I mentioned will work