我的问题是将一个div定位在一个“动态图片”下面,并在该div下方放置动态内容:
链接到jsfiddle
准备填写的jsfiddle css类:
1. .belowPicture 2. .belowBelowPicture HTML代码:
目标外观:
1. .belowPicture 2. .belowBelowPicture HTML代码:
<div id="wallDetailContent">
<section id="wallDetailMessage" style="width 100%">
<img class="wallDetailPicture" src="http://web.scott.k12.va.us/martha2/dmbtest.gif">
<div style="max-width:70%;">blah gik sig en tur, og købte blah med hjem</div>
</section>
<section class="belowPicture">
<p class="wallByDate"> 20140126220550</p>
<p class="wallByBy"> af </p>
<p class="wallByName"> Anders </p>
</section>
<section class="belowBelowPicture">
content (should be dynamic, able to fill all the height it need downwards.)
</section>
</div>
css:
.wallDetailPicture{
top: 5px;
right : 5px;
position: absolute;
display:box;
width:auto;
height:auto;
max-width:30%;
max-height: 200px;
}
.wallByName{
font-weight: bold !important;
color: blue;
display:inline-block !important;
}
.wallByDate{
font-weight: bold !important;
display:inline-block !important;
}
.wallByBy{
display:inline-block !important;
}
.belowPicture{
background:red;
}
.belowBelowPicture{
background:green;
}
目标外观: