F
F
FlexibleCurd2015-08-25 18:26:59
Adaptive design
FlexibleCurd, 2015-08-25 18:26:59

Responsive margins and padding (Ethan Marcott - Responsive Web Design)?

Good day to all!
I read in Ethan Marcott's book - Responsive Web Design, these lines:
"The contexts for flexible margins and flexible margins are slightly different.
1. When setting flexible margins for an element, take the width of the element's container as the context
. for the context of the width of the element itself. Think of the "box" model and these sentences make sense: we describe the box in relation to the width of
the
element
itself .
That is, neither margin nor padding fulfills these words: When setting a flexible margin for an element, take the width of the element itself as context.
The div element itself has a width of 100px, while the margin is only 50% and it has 609px, which clearly indicates that these values ​​​​are taken from the width of the container block (which in this case is the body), and not from the element itself.
You can call this question in another way: how to correctly calculate margins and indents in adaptive layout?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question