white-space: nowrap in SharePoint

March 15th, 2012 | Posted by Jeffrey Paarhuis in Designing | Developing

I looked for hours! I can’t find this thing anywhere else on the internet! There must be a complete group of developers and designers that have been struggling with this before! I can’t believe I’m supposed to be the first one to put this solution on the world wide web.

All I wanted to do is to disable the wordwrap in a specific div in SharePoint, like so:

white-space: nowrap;

It worked perfectly in all browsers, except for… That’s right! Internet Explorer!

After struggling for half a day I finally found out that SharePoint inserts another piece of styling called word-wrap. This is the SharePoint code:

word-wrap: break-word;

All I had to do is override this in my own style and voila, it finally works!

And now the working style looks like this:

white-space: nowrap;word-wrap: normal;

You can follow any responses to this entry through the RSS 2.0 You can leave a response, or trackback.

Leave a Reply

%d bloggers like this: