[thelist] [CSS] div width and white-space: nowrap

Mark Groen mark at markgroen.com
Wed Mar 31 22:04:34 CST 2004


----- Original Message ----- 
From: "Mark M"
To: <thelist at lists.evolt.org>
Sent: March 31, 2004 7:42 PM
Subject: RE: [thelist] [CSS] div width and white-space: nowrap


> example can be seen at:
> http://users.tpg.com.au/adslkm7b/list/
>
> You see how the red background on the 'Error' title doesn't go all the
way across.
> I want it to, without losing the white-space: no wrap;.

This works in IE6 and Firefox the way you want I think:

<div id="errorBox">
<h5 id="errorHeader">Error</h5>
<div id="errorInnerBox">There was a problem with the login details for
User ID 'fsad'</div>
</div>

div#errorBox {
border: 1px solid #FF0033;
width:90%;
margin-top: 10px;
margin-bottom: 10px;
}
h5#errorHeader {
color: #FFFFFF;

background-color: #FF0033;
margin: 0px;
padding: 4px;
display: run-in;
}
div#errorInnerBox {
padding: 4px;
white-space: nowrap;
}

cheers,

       Mark



More information about the thelist mailing list