Actually in the first example we denote the border, in the second we remove. Look what happened: Example 1:
Here is parent parent border:
#parent { position: relative; margin-top: 24px; box-shadow: 0px 0px 20px 0px #000000; border: solid 1px #ff3333; /*вот он*/ width: 600px; height: 400px; background-color: #000000; } #child { position: relative; margin-top: 100px; height: 240px; width: 320px; background-color: #0FF000; } <div class="container page-container" id="parent" align="center"> <div id="child"></div> </div> Example 2:
Here the parent has no border
#parent { position: relative; margin-top: 24px; box-shadow: 0px 0px 20px 0px #000000; border: solid 0px #ff3333; /*вот его нет*/ width: 600px; height: 400px; background-color: #000000; } #child { position: relative; margin-top: 100px; height: 240px; width: 320px; background-color: #0FF000; } <div class="container page-container" id="parent" align="center"> <div id="child"></div> </div> Attention question: What is the reason for this behavior of the parent and child object?
PS already to the project admins: The requirement to insert the code from jsfiddle is very inconveniently implemented. Collect code from all four frames? Very uncomfortable.
Собирать воедино код из всех четырёх фреймов? Очень неудобно.Собирать воедино код из всех четырёх фреймов? Очень неудобно.- the editor has a button on the top panel, if you haven't noticed, for the future:Фрагмент кода на Javascript/HTML/CSSor Ctrl + M hot key .... everything is likejsfiddle;-) ..... in As a result, you can see the executed code directly on the site ... as I have now corrected - Alexey Shimanskyborder: solid 0px #ff3333;? - VenZell