1

I have div sizing and floating problem. when I have tiny text it is OK:
SEE IMAGE
but look what happens when I have big text
SEE IMAGE

HTML:

<div class="news">
    <div class="img">
        <img src="url">
    </div>
    <div class="wrap">
        <div class="title">TITLE</div>
        <div class="text">TEXT</div>
    </div>
</div>

CSS:

.news{
    float:left;
    padding:5px 5px 2px 5px;
    margin-bottom:10px;
}
.news > .img{
    float:left;
    width:75px;
    margin-right:5px;
}
.news > .img > img{
    height:75px;
    width:75px;
}
.news > .wrap{
    float:left;
}
.news > .wrap > .title{
    font-size:14px;
}
.news > .wrap > .text{
    text-align:justify;
}

please help..

4 Answers4

0

Give the correct width wrap div

or

Give the 100% width on news div

ShibinRagh
  • 6,530
  • 4
  • 35
  • 57
0

This tutorial should be helpful:

http://www.monkeydoit.com/wrap-text-images-css.php

Trey Carroll
  • 2,382
  • 4
  • 22
  • 28
0

You have to set width to your .wrap container.

Damb
  • 14,410
  • 6
  • 47
  • 49
0

Try :

.news {
    float:left;
    padding:5px 5px 2px 5px;
    margin-bottom:10px
}
.news .img {
    float:left;
    width:75px;
    margin-right:5px;
}
.news .wrap .title { font-size:14px; }
.news .wrap .text { text-align:justify; }
Riba
  • 1,108
  • 8
  • 10