F
F
freeman02042015-10-10 22:37:16
css
freeman0204, 2015-10-10 22:37:16

Why is padding used instead of margin when indenting between columns?

There are 3 columns at 33.3% why when you need to indent between columns, they are done using padding? Although it would be more logical with the help of margins. Just not to bother with width calculations? Since box-sizing: border-box; takes into account paddings and borders.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Khristoev, 2015-10-10
@freeman0204

you can also use margins - width: calc((100%/3) - 20px)
jsfiddle.net/weq46z76/1

I
Ivanq, 2015-10-10
@Ivanq

Including because of box-sizing: border-box. But just, as far as I remember, margin works crookedly with cells. But I may be wrong.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question