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

Mark M mark at safefrombees.com
Wed Mar 31 22:33:10 CST 2004


Thanks for the try Mark,

Unfortunately I want it the width of the text, but not wrapped.

I've done it - but instead of setting the background-color, i've used a image in the background 
of the div#errorBox to mimic the background colour 

div#errorBox {
	width: 10%;
	border: 1px solid #FF0033;
	margin-top: 10px;
	margin-bottom: 10px;
	background-image : url(errorBoxBG.gif);
	background-repeat : repeat-x;
}

That's the best I could come up with.

Mark
------------------------------------------------------------------
mark at safefrombees.com
ICQ: 3094740
Safe From Bees
[ www.safefrombees.com ]


Quoting Mark Groen <mark at markgroen.com>:

> ----- 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
> 
> -- 
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
> 
> For unsubscribe and other options, including the Tip Harvester 
> and archives of thelist go to: http://lists.evolt.org 
> Workers of the Web, evolt ! 
> 
> 
> 


More information about the thelist mailing list