ceth
ceth

Reputation: 45325

Two columns layout

Here is my version:

<div>
    <div style="width:200px;float:left;display:inline-block;">
        123456789012345678901234567890123456789012345678901234567890123456789

    </div>
    <div style="margin-left:200px;">
        abcdefghijklmnopqrstuvwxyz 
    </div>
</div>

http://jsfiddle.net/EV6xF/

All works fine untill text is small:

enter image description here

How can I fix it ?

Upvotes: 1

Views: 79

Answers (1)

Anirudh Ramanathan
Anirudh Ramanathan

Reputation: 46778

Add word-wrap:break-word; to your CSS rule.

<div style="width:200px;float:left;display:inline-block;word-wrap:break-word;">

(Demo)

Upvotes: 3

Related Questions