camerican / NYCDA_SCC16_Jean

NYCDA Summer Code Camp 2016 - Jean's Work
0 stars 0 forks source link

Fix aspect ratio #4

Open camerican opened 8 years ago

camerican commented 8 years ago

For the image gallery, the aspect ratio of the images changes when the browser width is pulled in. This is because the height and width are both being specified as 25%, which means they're both dependent on the size of the viewport (AKA browser window area). Try specifying only width or height and leaving the other as "auto," which will preserve the aspect ratio.

Another alternative would be using the background image technique and clipping off parts of the image so that it fits within a container.