I am working with grid and want to make borders around every item. With style border, the borders in the middle becomes twice as wide as the border on the edges. I know there is a special trick for this, but I have forgot all about it. Do anyone know what I’m talking about?
Hello @zppbwmxpc4 !
I think this link can help you with styling the borders in the grid. When you click on it, it will take you to the border styling.
Wishing you good progress with your coding journey.
It depends on the grid, it also doesn’t matter if there is a gap
in the grid.
But for a fixed grid with a known column/row count, you just make the grid items share borders. If two grid items are next to each other, you give one border-right and the other no border-left, or if they are on top of each other only one of them should have a border-bottom and the other no border-top. Or vice versa, it doesn’t matter, just as long as they share the same borders.
Hello @zppbwmxpc4 !
This link has guidance on Grid Layout and offers on the left in the navigation menu, other Grid related guidance one can click on for help to learn and understand.
I, often, use this site, along with my learning on freeCodeCamp.
Wishing you good progress.
I have worked through all of the HTLM/CSS and think I learned some trick to do this. Only one small line of code. I thought it was border-collapse: collapse; but that didn’t work. So I guess I remember wrong.
I think that is only for tables.