Pregunta

I am planning to redesign my site using the Flexible Box Layout Module to make it responsive since it seems to be the winning layout method for responsive sites.

But what happens if an image in one of the boxes are wider than the viewport? Can I automatically scale down the size of the image if the image is too wide for the viewport?

I haven't been able to find solid info on this topic. This may be a basic or bad question, I am not sure.

¿Fue útil?

Solución

Yes, as following:

img {
max-width: 100%;
height: auto;
width: auto\9; /* ie8 */
}

(although I'm not sure if necessary, since mobile devices scale down images themselves)

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top