tags:

views:

28

answers:

1
<div id="broadcast">
<div class="broadcast_element">
 <div class="broadcast_username"><?php echo $row[0]?>:</div>
 <div class="broadcast_broadcast"><?php echo $row[2];?></div>
</div>
</div>

Simplified CSS:

.broadcast_element
{
 width: 100%;
}
\#broadcast
{
 width: 200px;
}

The problem is: The php script echoes the data in a straight line causing it to the overflow from the div (broadcast).
word wrap: I hate IE, so no way i'm using that.
overflow: the properties do not provide what i want to achieve.

The question simply - I'm looking for a solution that'll solve this overflow problem once and for all. I'm looking for something general i can apply in any similar case.

My thoughts - Being a noob the only way i can think of is using javascript to insert a <br/> after every 200px of data? I know thats sad :P.

Thank You.

+1  A: 

Did you try those CSS properties :

Chouchenos
word-wrap: break-word;Thats the one. thanks.
Susagittikasusa
I quote your original post: **word wrap: I hate IE, so no way i'm using that.** - ? implying you *didn't* want to use word wrap?
Ross
He may want to talk about the php function?
Chouchenos