tags:

views:

27

answers:

1

Hi

I have this CSS code :

    #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;
}

I have this HTML code :

<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>

I have proplem in n_div, if I put in it a very long text it will be under im div and I want the text inside it to go to new line when it reach the end because the image should be to the right of the text in im div .

How I can do that?

Thanks in Advance.

+3  A: 

You want to use word-wrap:

word-wrap: break-word;
Graphain