CSS properties for text wrapping

A problem I've encountered on my website and seen on others is when text wrapping causes text to overflow the borders of its container. Here is an example style and associated properties to avoid this problem occurring:

.yourstyle

{
min-width:250px;
width:100%;
display:block;
overflow:hidden;
white-space:nowrap;
}

In my case, the style is applied to a series of <li> tags.

The 3 key properties are display, overflow, and white-space.

Published Thursday, January 25, 2007 1:05 PM by gcastner
Filed under: ,

Comments

No Comments