S
S
smiof2016-05-16 23:23:35
css
smiof, 2016-05-16 23:23:35

Fixed image size how?

8035ba1852b54c2a95b0a67b499eb2dc.png
A question about pictures for comments, I was dropped quite large pictures in size and I need to put them there and the question
Do I need to cut them to a fixed size? can be done differently?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey Goryachev, 2016-05-16
@webirus

Stepan Spanov is nothing like that :)

A
Alexander Knyazev, 2016-05-16
@alexandrknyazev13071995

Generally looking in what the task consists. If you do it in a good way, it’s better not to put large photos on avatars, but to crop them first. But if the task is just layout, then I would do this:
1) Wrap these images in div blocks, which I would set the desired size (in pixels or percentages, it doesn’t matter), for example

div{
   width: 100px
   height: 170px
}

2) I would install pictures inside the blocks
img{
   width:100%;
}

D
Dmitry Arushanov, 2016-05-17
@daruwanov

img{
 width: Npx;
 height:auto;
}

Ну или наоборот
img{
 width: auto;
 height: Npx;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question