Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to specify left right padding on columns as well As vertical margin between rows #33

Closed
ishields opened this issue Dec 13, 2014 · 5 comments

Comments

@ishields
Copy link

@troolee In some cases you want to be able to define the padding on columns and rows. By default currently rows have a padding of 20px and columns have a padding of 10px on both left and right sides. These values should be options. This will allow users to have grid items touch if so desired.

@ishields
Copy link
Author

Looks like vertical margin is actually an option already - "vertical_margin". And now that I look closer left and right padding can simply be overridden in the css

.grid-stack-item-content, .placeholder-content{
left: 0;
right: 0;
}

Assuming this does not have any negative effects in calculating positions, this should work fine.

@troolee
Copy link
Member

troolee commented Dec 13, 2014

Hi,

Yes, vertical margins are defined and could be overrode in CSS:

.grid-stack-item .grid-stack-item-content,
.grid-stack-item .placeholder-content {
    left: 10px;
    right: 10px;
}

and vertical margin could be overrode during initialization.

@troolee troolee closed this as completed Dec 13, 2014
@gustavomick
Copy link

just out of curiosity. Why is it 20 and not 0 by default.. or configuratble anyway, it seems to me a usual need.. any thoughts welcome in advance.

@tomgallagher
Copy link

I'm slightly stumped why there's no horizontal margin setting. Over-riding the horizontal margin settings in CSS does not seem to work for me. So I have a nice 20px gap between rows and no gap at all between columns.

@DavidKDeutsch
Copy link

I found that I had to add a class to the selector to get a high enough specificity:

.grid-stack .grid-stack-item .grid-stack-item-content,
.grid-stack .grid-stack-item .placeholder-content {
    left: 10px;
    right: 10px;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants