I need to add scroll to the div. The problem is that the div in witch is text needs to be in percentage. So if there is a long name i need to scroll it in parent.

HTML:
<div id="list">
<div class="info">
<div class="image">
<img src="https://dl.dropbox.com/u/14396564/no_camera.jpg"> </div>
<div class="text_data">Intell. off. ch. 1 with a very very very long</div>
</div>
<div class="info">
<div class="image">
<img src="https://dl.dropbox.com/u/14396564/no_camera.jpg">
</div>
<div class="text_data">Intell. off.</div>
</div>
</div>
CSS:
#list{
max-height:200px;
overflow-y:auto;
padding:5px;
/*display: none;*/
}
.info{
border: 1px dashed #CCCCCC;
margin-bottom: 5px;
padding:5px;
overflow: hidden;
cursor: pointer;
}
.info .image{
width:20%;
display:inline-block;
margin-right:20px;
/*border: 1px solid red;*/
}
.info .image img{
width: 100%;
}
.info .text_data{
display: inline-block;
/*border: 1px solid green;*/
vertical-align: top;
overflow-x: auto !important;
}
If you want the text to always appear to the right of the image, without wrapping, you need to set the div’s
white-spaceproperty tonowrap.New jsFiddle
So this is the new CSS for
class="info"(the rest is unchanged).