http://jsfiddle.net/ETkkR/
<div id="Blog1">
<div class="post">
<img src="http://dummyimage.com/180x120/000/fff" alt="Image 1" title="This is my first image"/>
<div class="post-info">
<span>post title post title post title</span>
</div>
</div>
<div class="post">
<img src="http://dummyimage.com/175x104/f0f/fff" alt="Image 2" title="The second one is pretty"/>
<div class="post-info">
<span>post title post title post title</span>
</div>
</div>
</div>
div.post-info, in some cases (images of width than the div.post-info content)fits div. 但是,有时是干 d的主食。 通过重新配置员额。 如何使post后info子适合parent子的 w子,如果更多的话,则不会再 res。
my css
#Blog1{
padding:10px;
}
#Blog1 .post{
border:1px solid #000000;
margin:3px;
text-align:center;
position: relative;
display: inline-block;
*display: inline;
zoom: 1
}
.post img{
height:100px;
}
.post .post-info{
text-align:left;
}
.post .post-info span{
word-wrap:break-word;
}
Edit
YOU CAN CHANGE THE ELEMENTS AS LONG AS THE CONTENT REMAINS SAME TO CREATE A SOLUTION people keep giving solutions which are not suitable for what i m asking...what i need is for the child div .post-info to not be a greater width than that of the .post parent div