I’m using the Atelier theme and ran into a little CSS issue on my product pages. I have my size variant buttons set up in a grid with gap: 0 so the boxes touch each other, but now the borders between them look thicker than 1px.
It seems like the borders of each box are stacking when they connect, so visually the lines look double — not the clean 1px grid I want.
I tried this, and it partially worked. For some products with only one row of sizes, it shows 1px but nothing on the right. For other products that have 2 or 3 rows, it still shows 2px and nothing on the right.
Hey I’ve run into this before, you’re right, the borders are stacking because each button has its own 1px border touching the next one.
An easy fix is to remove one side of the border so they don’t overlap. For example, keep the top and left borders on all buttons, then remove the right border except for the last column and the bottom border except for the last row.
How do you think I’ve got those screenshots if it does not work?
It may fail you be because I suggest the solution; you change your codes for three days and then, all of a sudden the solution does not work because of those newly-added codes.
Even though, it still can work if you add !important to the margin value or undo margin rule in your code…