Set space between grid items (without changing size of grid items)
- [X] Bug
- [ ] Feature Request
- [X] Question
Is there a way to set the space (margin) between the grid items (in pixels) without changing the size of the grid items? One should think that margin is applicable for this, but changing the margin also changes the size (width and height) of the grid items, which is unfortunate.
Just increase the size to compensate.
On Jun 27, 2017 2:03 AM, "Øystein Wethe Hanssen" [email protected] wrote:
- Bug
- Feature Request
- Question
Is there a way to set the space (margin) between the grid items (in pixels) without changing the size of the grid items? One should think that margin is applicable for this, but changing the margin also changes the size (width and height) of the grid items, which is unfortunate.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/STRML/react-grid-layout/issues/583, or mute the thread https://github.com/notifications/unsubscribe-auth/ABJFP-X63OAq08qEVboQgUGZUSSMuHveks5sIKkzgaJpZM4OGOLf .
Thanks for your reply! :) I'm sure this is a stupid question, but how do I do that?
E.g. if I change the margin from [10,10] to [0,0] or [13,13], what should be increased/decreased to avoid changing the size of the grid items?
Grid setup:
- breakpoints = { lg: 768, sm: 0 }
- cols = { lg: 72, sm: 1 }
- rowHeight = {10}
A grid item's layout can be e.g.:
- h:10
- minH:2
- minW:4
- w:24
- x:0
- y:0
surely, you can put x and y values such that u can generate minimum gap b/w them.... i hope this will solve ur issue but yes this will affect on container's width and height !! but still u can set your data-grid in such way that u will have desire spaces b/w ur boxes....
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this issue will be closed in 7 days
Thanks for your reply! :) I'm sure this is a stupid question, but how do I do that?
E.g. if I change the margin from [10,10] to [0,0] or [13,13], what should be increased/decreased to avoid changing the size of the grid items?
Grid setup:
- breakpoints = { lg: 768, sm: 0 }
- cols = { lg: 72, sm: 1 }
- rowHeight = {10}
A grid item's layout can be e.g.:
- h:10
- minH:2
- minW:4
- w:24
- x:0
- y:0
Hi @oyshan Did you get any success on this issue?
- [x] Bug
- [ ] Feature Request
- [x] Question
Is there a way to set the space (margin) between the grid items (in pixels) without changing the size of the grid items? One should think that margin is applicable for this, but changing the margin also changes the size (width and height) of the grid items, which is unfortunate.
Hi @oyshan Did you get any success on this issue?