div 안에 div가 있고 내부 div에 배경색이나 배경 이미지가 포함되기를 원합니다. 내 코드는 다음과 같습니다빈 div 배경색을 전체 div로 채우기
는 내가 원하는 것은 빨간색 상자입니다모든 방법을 확장하고 일치하도록 :
<div class="row two">
<div class="cols n15">
<h2 class="latestVideo">Latest Video</h2>
<iframe width="100%" height="370" src="//www.youtube.com/embed/a-XQL60NVmQ" frameborder="0" allowfullscreen></iframe>
</div>
<div class="cols n9 clearfix">
<h2>Other Videos</h2>
<div class="otherVids">
<p>"test"<p>
<!-- <img src="images/otherVideos.jpg" alt=""> -->
<div class="video1">
</div>
<div class="vidoe2">
</div>
<div class="video3">
</div>
</div>
<div style="clear:both"></div>
는 지금이 그것을 다음과 같이한다 왼쪽에있는 div의 높이. div (otherVids) 높이와 너비가 있으면이 방법이 효과가 있다는 것을 알았지 만,이 경우 웹 사이트가 더 이상 반응하지 않습니다.
그래서 어쨌든 div 배경을 여전히 공백으로 채우면서 빈 공간을 채우려면?
.otherVids{
background-image: url('images/otherVideos.jpg');
background-color: red;
width: 100%;
height: 100%;
}
iframe 높이가 너비 만 변경하지 않기 때문에이 작업을 수행해야합니다. – P22