How to control the text inside DIV tag by not allowing the text to be increased?

Posted by SzamDev on Stack Overflow See other posts from Stack Overflow or by SzamDev
Published on 2010-06-16T08:18:22Z Indexed on 2010/06/16 8:22 UTC
Read the original article Hit count: 190

Filed under:
|

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.

© Stack Overflow or respective owner

Related posts about html

Related posts about css