/ Published in: CSS

In the example .description is a label and so needs to be made a block level element. For <p> elements (etc) this is not needed.
The key to all this is overflow:hidden.
The key to all this is overflow:hidden.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<style> #container {width:200px;} #checkme {float:left;} .description {overflow:hidden;display:block;} </style> <div id="container"> <input type="checkbox" id="checkme"/> <label class="description">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ac nisi eu massa ultricies dapibus vel a nibh. In hac habitasse platea dictumst. Quisque placerat tortor non erat rhoncus tincidunt</label> </div>
Comments
