View Full Version : Problem with whitespace in nested divs with IE

29 Dec 2010, 04:38 AM
Hi to all,

I am using this code

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<meta http-equiv="Expires" content="Fri, Jan 01 1900 00:00:00 GMT">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Lang" content="en">
<meta name="author" content="">
<meta http-equiv="Reply-to" content="@.com">
<meta name="generator" content="PhpED 5.8">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="creation-date" content="01/01/2009">
<meta name="revisit-after" content="15 days">
<link rel="stylesheet" type="text/css" href="my.css">
<div style="white-space: nowrap;">ovde prvi tekst ide
<div style="width: 20px; white-space: normal; word-wrap:break-word; word-break: normal;">oasd fksl lfasdk falsdf asdf oasd fksl lfasdk falsdf asdf oasd fksl lfasdk falsdf asdf oasd fksl lfasdk falsdf asdf oasd fksl lfasdk falsdf asdf

In IE text in nested div is shown in one line and width is bigger then 20px. I want to force text to wrap and width of div have to be 20px. Is it possible to achive something like that but only with CSS style without adding new tags in nested div.
Also in container div white-space needs to be nowrap. If not I have to make a lot of changes.
Problem occurs only in IE. In FF is working fine.

Any suggestion?
Greetings and thanks in advance