Hi Brian, Alan, David

Thanks for your ideas.

The float idea looks promising; I'll have to see how it behaves when I add
in the other elements (the example is a considerable simplification of the
live case).

Unfortunately I cannot use "white-space: pre" and need the NBSP entities
because this HTML has to survive some Javascript processing: it's probably
off-topic for css-d but we have found that IE strips (some of) the
white-space out of document.body.innerHTML, so the non-breaking spaces are
essential.

Setting a min-width causes the scrollbar and code box to play nicely
together, though I think to do it properly condemns me to calculating exact
line lengths for all the content, which (in the live case) isn't as easy as
counting characters, if only :-)

"Overflow: auto" doesn't display nicely, I think I'll pursue the other
options first.

Cheers
T

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Brian Funk
Sent: Tuesday, 17 February 2009 8:02 a.m.
To: [email protected]
Cc: [email protected]
Subject: Re: [css-d] nowrap and border issue in IE6 and/or IE7

Trevor Nicholls wrote:

> Example found at http://homepages.ihug.co.nz/~tmjpbn/csw5.html

> I have a (div) code fragment which has a text content (div) 'fragbody',
> styled with white-space:nowrap ...

You could use white-space: pre; which would give the same no-wrap effect 
but you could eliminate all the (21 in this case)   characters.


> ... if the browser window is narrowed the border and colored
> background "box" will not shrink to be smaller than the text, and the user
> can scroll right to see the end of the text and the edge of the box. This
is
> the desired behaviour.


Would floats be an option? I achieved what I /think/ you're after by 
floating both divs.
<http://www.stoneladder.ca/sandbox/css/nowrap-01.html>

-- 
Brian

______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to