나는 이것에 대한 대부분의 게시물을 검토했지만 도움이되지 않았습니다.div의 높이가 동적으로 늘어나지 않습니다.
나는 그것이 윈도우의 길이를 맞는 아이에 적용이 너무을 div를하도록 div
퍼센트 100 에 높이을 증가해야합니다.
#container{
width: 75%;
background-color: silver;
background-position: center;
min-height: 100px;
overflow : hidden;
margin: 0 auto;
}
#header{
background-color:infotext;
}
h1{
margin-bottom: 0;
color: white;
}
#list{
width: 20%;
background-color:window;
float: left;
height:100%;
}
#links{
width: 55%;
}
코드 :
<body>
<div id="container">
<div id="header">
<h1 align="center">Represent</h1>
</div>
<div id="list">
<span><h4>Fruits</h4></span>
<hr>
<p>Apple</p><br>
<p>Mango</p><br>
<p>Orange</p>
</div >
<div id="links">
<iframe src="http://www.google.co.in" frameborder="0">
</iframe>
</div>
</div>
</body>
문제가 container div
과 divs
의 나머지는 iframe
크기가 크고 따라서, scrollbar
나타납니다 경우에도 확장하지 않습니다. 어떤 해결책?
또 다른 문제 :
가iframe이의 사업부는 전체 폭을 차지하지 않습니다. #list에 20 %, #link에 55 %를 할당하여 부모 div #container 75 %에 맞 춥니 다. 이것은 일어나지 않는다 !!
html, body, .full-height {
height: 100%;
}
body {
margin: 0; // <-- to avoid unnecessary scrollbars.
}
이
그런 다음 바로 full-height
을 추가
이 CSS를 추가
브라우저 창? – Milind
아니요, div 안에 iframe이 있고 왼쪽에는 목록이 있습니다. div (iframe 포함)가 전체 공간을 채우는 경우 너비 만 남기고 싶습니다. – Mercenary