Hide misplaced borders in the compact design

The border on top is white and therefore not visible. It's simply the wrong element hidden.

The border at the bottom was gray and visible. It looked like a misplaced 2px border.