Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grid container like Bootstrap container

Tags:

material-ui

So, I want to create a page layout what will look like this: enter image description here

For example, in Bootstrap I can simple write:

<div class="container">
  <!-- Content here -->
</div>

And everything will be cool.

Is there a good clean solution to do something like this in Material-UI? By default Grid system create fluid-container with full width.

like image 646
Peretz30 Avatar asked Mar 13 '18 08:03

Peretz30


People also ask

Can you use Bootstrap with grid?

Bootstrap has a responsive grid system, with custom breakpoints. It offers a mobile-first design that makes a single code scale for multiple devices like phones, tablets, and desktops.

What is the difference between Bootstrap container and container-fluid?

The .container class provides a responsive fixed width container. The .container-fluid class provides a full width container, spanning the entire width of the viewport.

Is Bootstrap flex or grid?

Bootstrap's grid system uses a series of containers, rows, and columns to layout and align content. It's built with flexbox and is fully responsive. Below is an example and an in-depth look at how the grid comes together.

What are different types of containers in Bootstrap?

Bootstrap comes with three different containers: .container , which sets a max-width at each responsive breakpoint. .container-fluid , which is width: 100% at all breakpoints. .container-{breakpoint} , which is width: 100% until the specified breakpoint.


1 Answers

If you're looking for something that behaves like bootstrap's .container then I would use Material UIs <Container /> tag. As a starting wrapper/container, I would not use the <Grid /> tag.

<Container maxWidth="lg">
  <!-- Content here -->
</Container>

https://material-ui.com/components/container/

like image 110
Napoli Avatar answered Sep 20 '22 18:09

Napoli