Ниже приведены снимки того, что у меня есть на данный момент, и чего я хочу достичь. Второе изображение, которое я смог сделать, увеличивая высоту с помощью пикселей вручную только для иллюстрации, но я хотел бы, чтобы это достигалось автоматически из размера содержимого внутри контейнера ...Высота основного контейнера div не увеличивается динамически, когда содержимое внутри div увеличивается
Image1:
Image2:
HTML:
<div id="top-body" style="clear:both">
<div id="info">
<p>Dixon Woods School of Dance was established 25 years ago in Newbold Verdon. Although lessons still take place in Newbold Verdon the main activities of the school now take place in their purpose built studios in Oadby.
All lessons are given under the personal supervision of the principal Michelle Dixon-Woods. The school is recognised as having exceptionally high standards, which is reflected in examination and festival results achieved by the pupils.</p>
</div>
</div>
<div id="footer1">
<div id="footer-image">
</div>
</div>
CSS:
top-body {
margin: 0 auto;
background-color: #ffffff;
height: auto;
overflow: hidden;
position: absolute;
top: 197px;
width: 960px;
padding-top: 7px;
}
info {
width: 327px;
float: right;
margin-right: 39px;
margin-top: 14px;
}
#info p {
font-size: 15px;
font-family: "myriad pro";
line-height: 15px;
text-align: justify;
}
#footer1 {
width: 960px;
height: 23px;
}
#footer-image {
width: 100%;
background-image: url('../images/footer-border1.png');
height: 23px;
}
Ваша проблема заключается 'переполнения: скрытый;' ' – Andrew
переполнения: скрытый; позиция: absolute; 'вызывает проблему. –
Спасибо вам, это действительно сработало. еще раз спасибо – user1278496