overflow-y: automático y ancho: 100% en Chrome de Google

width:100%; overflow: auto; /* or overflow-y:auto or scroll */ works fine in all browsers but Google's Chrome. It is my understanding that this is a bug, however, I cannot find any workaround. The demo is available here:


Screenshot (FF & Google Chrome):

enter image description here

preguntado el 27 de agosto de 11 a las 18:08

maybe it's because I'm on mobile and the images are small but I can't spot the difference -

Do you have Google Chrome on your mobile? Have you take a look at the screenshot? See the red thing? it shouldn't be there. -

Oh, you meant the red thing, I thought that was just part of the screenshot. -

2 Respuestas

Remove the margin-left on #body.

Chrome does have some problems with margins and floated elements, but this fix doesn't appear to harm your layout.

Respondido 27 ago 11, 22:08

Not sure why I didn't notice this myself, though, yes, it seem to fix the issue. - Anacardos

Fixed ! Remove the margin-left from the #body styles.

position: relative;
overflow-x: hidden;
overflow-y: scroll;
height: 100%;
background: cyan;

Respondido 27 ago 11, 22:08

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.