T
T
Tutucu2016-03-09 14:22:33
css
Tutucu, 2016-03-09 14:22:33

How to align images of different sizes so that they fill the entire page?

There are many images (photos) vertical, horizontal, with the same width and height. How to make sure that all of them completely fill the page on the site and at the same time retain the original proportions (at least approximately)? For example, like on this site: Example .

Answer the question

In order to leave comments, you need to log in

4 answer(s)
C
Cyber_bober, 2016-03-09
@Tutucu

for holeless layout use masonry.js masonry.desandro.com

A
Anton Nagaets, 2016-03-09
@gr1mm3r

Example
Correctly noted Cyber_bober Images have a fixed height.

B
BohdanK, 2016-03-09
@BohdanK

It’s unlikely to do without JS (jQuery), I don’t know such a solution, except to make images as backgrounds in css, but this is not done. Try this script to apply on your task: jsfiddle.net/oceog/bQjk8

A
Artem Petrenko, 2016-03-09
@GailWynand

you can try flexbox

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question