Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

139
Views
Layout breaks when Material Ui grid wrapped in div element

I have responsive dashboard build with Material Ui Grid elements. And one of the grid items wrapped in div element which breaks the layout.

Here is playground with div element - https://codesandbox.io/s/basicgrid-material-demo-forked-pkkil?file=/demo.js

Here is playground without div element, and this how it should be with div - https://codesandbox.io/s/b1wsf?file=/demo.js

div element cannot be replaced or removed...

Any suggestions?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Mui Grid component is designed the way that Grid container should always be parent of Grid item prop. Grid container is cloning Grid item and passing to it additional configuration it is not based on react context.

Only sane way to get this working is to remove div.

Or provide custom css styles to this to emulate grid spacing.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!