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

Provide a 'fixed width' container #12

Closed
bassmartin opened this issue Oct 26, 2016 · 6 comments
Closed

Provide a 'fixed width' container #12

bassmartin opened this issue Oct 26, 2016 · 6 comments

Comments

@bassmartin
Copy link

In Twitter Bootstrap, the default container has a maximum width (it won't fill the width on huge screens).

Use .container for a responsive fixed width container.
Use .container-fluid for a full width container, spanning the entire width of your viewport.
ref: http://getbootstrap.com/css/#overview-container

Container width None (auto) 750px 970px 1170px

This allow applications to be centered on big screens (like Facebook for example)

Is that something you would consider adding to the library?

@JarekToro
Copy link
Owner

JarekToro commented Oct 26, 2016

Yes and this is already in development at the moment, and will be released soon.

JarekToro added a commit that referenced this issue Oct 26, 2016
@JarekToro
Copy link
Owner

JarekToro commented Oct 26, 2016

API

ResponsiveLayout responsiveLayout = new ResponsiveLayout(ContainerType)
responsiveLayout.setContainerType(ContainerType)

ContainerType.FLUID || FIXED

@bassmartin
Copy link
Author

bassmartin commented Oct 26, 2016

The container is not centered. It is kind of more on the left side...

@bassmartin
Copy link
Author

Found why, my fault.
You changed the default behaviour of addColumn() when no displayRules are set and this led to the container not being drawn in the center.

I added withDisplayRules(12,12,12,12) where I was assuming the 'default' behaviour and it shows in the center properly.

👍

@bassmartin
Copy link
Author

bassmartin commented Oct 27, 2016

Small note about this change:

When defining nested ResponsiveLayout objects, they need to be created with ContainerType.FLUID or the UI won't draw properly. ;-)

I suggest you set FLUID as the default container type in the no-args constructor since we only need the top-most container to be FIXED.

@JarekToro
Copy link
Owner

Thanks! Moved this to separate issue #15

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

2 participants