У меня есть этот код CSS:
#d_image {
float: left;
width: 320px;
margin-top: 20px;
margin-left: 25px;
}
#d_coll {
width: 320px;
float: left;
}
#n_div {
width: 240px;
text-align: right;
padding-top: 10px;
float: left;
padding-right: 10px;
padding-left: 0px;
}
#n_text {
text-align: right;
float: left;
clear: both;
}
#im {
height: 50px;
width: 50px;
float: right;
padding-right: 15px;
}
#n_col {
clear: both;
width: 310px;
float: right;
border-bottom-width: 2px;
border-bottom-style: solid;
border-bottom-color: #CCC;
padding-bottom: 10px;
}
#n_tittle {
text-decoration: none;
text-align: right;
padding-bottom: 10px;
padding-right: 15px;
}
#n_tittle a {
text-decoration: none;
text-align: right;
color: #1C60B3;
}
#n_tittle a:hover {
text-decoration: underline;
text-align: right;
color: #FF0000;
}
У меня есть этот HTML-код:
<div id="d_coll">
<div id="d_image">sample text</div>
<div id="n_text">Here will be photo</div>
</div>
<div id="n_col">
<div id="n_tittle">sample text</div>
<div id="im">small photo will be here</div>
<div id="n_div">long text</div>
</div>
У меня есть proplem в n_div , если я добавлю в него очень длинный текст, он будет находиться под im div , и я хочу, чтобы текст внутри него переходил на новую строку, когда он дойти до конца, потому что изображение должно быть справа от текста в im div .
Как я могу это сделать?
Заранее спасибо.