我正在尝试根据其内容调整父容器的大小。目前,它使用百分比作为宽度。不幸的是,图像容器不会根据其内容调整大小。
有没有办法根据父容器的宽度(包括内容)调整子容器的大小,或者让父容器调整大小?或者子内容(即图像)应该是不同大小而不是固定大小?非常感谢。
#content {
margin-top: 58px;
margin-right: 1.0416667%;
/* 10 div 960 */
float: right;
background-color: #dedede;
width: 72.7083333%;
/* 698 div 960 */
}
#gallery_container {
list-style-type: none;
padding: 0px;
margin: 0px;
background-color: #302200;
}
#gallery_container ul li {
display: inline;
}
#gallery_container ul li img {
padding-top: 10px;
}