After spending some time working on a grid layout using the metafizzy isotope packery mode, I have encountered a few issues. To illustrate my problem, I have provided a link to a codepen below:
http://codepen.io/anon/pen/EgKdpL
Although I am satisfied with most of my grid design, there are two main issues that I need help resolving.
Firstly, I tried to add padding to the main grid selector class "griditem" in order to create a simple white border around all grid items. However, the results were inconsistent, with some gaps appearing larger or smaller than others. I attempted to achieve the same effect using CSS borders but encountered the same problem.
.grid-sizer,
.grid-item {
margin: 0!important;
padding: 10px!important;
}
The second issue involves an overlay on each grid item that displays a title or heading. Due to the padding applied, the overlay ends up overflowing. Is there a solution to prevent this from happening?
http://codepen.io/anon/pen/EgKdpL
I would appreciate any assistance you can provide.
UPDATE
Following the advice given in the responses, I implemented changes in the codepen. The rollover state has been fixed and works correctly now. However, the issue of uneven borders/padding remains visible, for example, on the first blue box.