Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

203
Vistas
Material UI Grid item not working properly

I have:

      <div style={{ flexGrow: 1 }}>
        <Grid container spacing={0} style={{ width: '100%' }}>
          <Grid item xs={12} sm={6}>
            Left Side
          </Grid>
          <Grid item xs={12} sm={6}>
            right Side
          </Grid>
        </Grid>
      </div>

You can see the generated styles are just MuiGrid-item with no reference of the size. What am I doing wrong?

enter image description here

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

I copied your code to a CODE-SANDBOX and everything was fine there.

Here is the screenshot: Chrome DevTools snapshot

As you can see, everything is working like a charm.

The only thing that I mentioned in your question is that in the screenshot you've provided, you've applied a background: red; style to the container, but there is no such a style property in the code that you've inserted.

Maybe you're not connected to the development server, and you are viewing a cached version, which can be caused by service workers in your PWA.

It's recommended that you do not enable an offline-first service worker in a development environment, as it can lead to frustration when previously cached assets are used and do not include the latest changes you've made locally.

It was great If you could provide more details in your question.

about 4 years ago · Juan Pablo Isaza Denunciar

0

!! you didn’t do anything wrong, you can watch here your code and it work https://codesandbox.io/s/zealous-montalcini-x02kg with class "MuiGrid-grid-xs-12 MuiGrid-grid-sm-6" like you want .

your code is correct

have you tried turn it off and on again? lol

maybe you watch your code in wrong page, the old version of your code or something like that, also try to open your page in private browser and check if it's work.

also check if you use last version of material-ui. i mean version accept CSS Grid Layout (but i think it's work in all version just check that maybe!?).

i hope that can help you, have a good luck.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda