親要素がposition: relativeの時に
子要素がposition: relativeで
その子要素には特にheight指定はないけど、
要素として存在する分のheightはあるんじゃないですか。
それが即ち、親要素のheightにもなるのではないのでしょうか?
親要素、子要素共にheightに対しての指定はない状況においてです。
なのに、なぜか次の要素が引きあがってきちゃうんですよ・・・。
何か、間違った理解をしているのでしょうか・・・。
子要素がabsoluteだったら、heightがなくて
次の要素が上がってくるのはわかりますが、
子要素がrelativeでも各子要素がheight指定がない限り
次の要素が上がってきちゃうのでしょうか?
現状はなぜかsection5が勝手に上がってきてるので、
margin-topでその分入れてますが、
relativeで入れたのにmarginでそこを確保すべきなのか?
コードで間違いがあったのかなと思い、
質問させて頂きます・・・。
html
1<section id="section4"> 2 <h2>Interview</h2> 3 <figure id="people-img"> 4 <img src="image/index/index_img09.png"> 5 </figure> 6 <div id="people-area"> 7 <a href="#" class="pic" id="pic01"> 8 <div class="a-hover"></div> 9 <p>01</p> 10 <div class="animated"> 11 <img src="image/index/index_img10.png"> 12 </div> 13 <div class="shadow"> 14 <div class="shadow-in"> 15 一番目の人 16 </div> 17 </div> 18 </a> 19 <a href="#" class="pic" id="pic02"> 20 <div class="a-hover"></div> 21 <p>02</p> 22 <div class="animated"> 23 <img src="image/index/index_img11.png"> 24 </div> 25 <div class="shadow"> 26 <div class="shadow-in"> 27 二番目の人 28 </div> 29 </div> 30 </a> 31 <a href="#" class="pic" id="pic03"> 32 <div class="a-hover"></div> 33 <p>03</p> 34 <div class="animated"> 35 <img src="image/index/index_img12.png"> 36 </div> 37 <div class="shadow"> 38 <div class="shadow-in"> 39 三番目の人 40 </div> 41 </div> 42 </a> 43 <a href="#" class="pic" id="pic04"> 44 <div class="a-hover"></div> 45 <p>04</p> 46 <div class="animated"> 47 <img src="image/index/index_img13.png"> 48 </div> 49 <div class="shadow"> 50 <div class="shadow-in"> 51 4番目の人 52 </div> 53 </div> 54 </a> 55 </section> 56 <section id="section5"></section>
css
1#section4 { 2 width: 1220px; 3 margin: 0 auto; 4 position: relative; 5 padding-top: 400px; 6 height: auto; 7} 8#section4 h2 { 9 font-size: 11.4rem; 10 letter-spacing: 0.16em; 11 text-align: center; 12 position: relative; 13 z-index: 1010; 14} 15#section4 #people-area { 16 width: 1100px; 17 margin: 0 auto; 18 display: flex; 19 flex-wrap: wrap; 20 position: relative; 21 flex-direction: row; 22} 23#section4 #people-img { 24 right: 25px; 25 position: absolute; 26 z-index: 10; 27 top: 370px; 28} 29#section4 #people-area #pic01 { 30 position: relative; 31 left: 70px; 32 top: 280px; 33} 34#section4 #people-area #pic02 { 35 position: relative; 36 right: 0px; 37 top: 670px; 38 z-index: 1000; 39} 40#section4 #people-area #pic03 { 41 position: relative; 42 left: 10px; 43 top: 1120px; 44} 45#section4 #people-area #pic04 { 46 position: relative; 47 right: 70px; 48 top: 1340px; 49 z-index: 1000; 50} 51#section5 { 52 margin-top: 1900px; 53 position: relative; 54 background-color: #fff; 55 height: 986px; 56 width: 100%; 57}
書かれている状況が再現するコード(HTML/CSSなど)を提示されたほうが回答を得やすいと思います。

失礼いたしました。コードより各要素の概念で私の理解に間違いがあるのではと思い、特に載せなかったです・・・。アドバイス通り、コード添付いたしました。ありがとうございます。
