F
F
freeman02042015-10-11 00:02:06
css
freeman0204, 2015-10-11 00:02:06

Do I need to specify a width and height for the block, or just padding?

In the picture screenshot.ru/5cc7044b3f9feb4f2c3954ef0ed28827 there are elements where you can explicitly specify the width and height or just give padding to the inner element and thereby visually form the width and height. When should this be done and when should it not?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
T
Timur Sergeevich, 2015-10-11
@MyAlesya

Use padding on the outer element.

K
kappka, 2015-10-11
@kappka

Imagine if you wanted to increase the font size in one of these blocks. Or the icons on the left will become larger (or smaller). With a fixed size, you will have to set it again with each change.

I
Ivan Drozhzhin, 2015-10-11
@RotarYMonkeY

In these cases it is better to use paddings, as the contents of the Block can change and in the case of paddings, the styles do not have to be edited.

S
Sergiu Mitu, 2015-10-11
@EaGames

prntscr.com/8pz7cu padding
the rest is fixed width, and in some cases height.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question