F
F
freeman02042015-10-08 14:45:58
css
freeman0204, 2015-10-08 14:45:58

How to calculate grid using calc()?

I want to create a grid based on calc(). There is such a template screenshot.ru/1e72914db1c1b14fb8eeace109f05b71
width 940px. The width of the left column is 18%, the middle is 55% and the width of the right column is 24%, totaling 97%. (These percentages are based on whether the content fits in the container). It remains, in theory, 3% for indents, i.e. 1.5% for each of the two.
How to write this in the calc() formula. (You can also see that between the columns, there are 2 borders on the left and right, which occupy 1px)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
littleguga, 2015-10-08
@freeman0204

Maybe so?
full size

V
VA_ic2b, 2015-10-08
@VA_ic2b

It's easier to calculate your layout using css box-sizing : border-box
Read for example: htmlbook.ru/css/box-sizing

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question