Wednesday, March 26, 2014

How to avoid wrapping in html or css.


Wondering how to avoid wrapping in html or css. 

You can use css property "white-space"  to prevent wrapping in html or css


Below is the example 

Say your content is like this 

<p>
My Content My Content My Content My Content My Content My Content My Content My Content My Content 
</p>


// CSS
p{
white-space : nowrap;
}

Here is the fiddle for the same :  http://jsfiddle.net/4Fty3/

No comments:

Post a Comment