Hi Sarah

I'm afraid that suggestion doesn't work. The browser shows a horizontal
scrollbar no matter how wide the window is stretched, and the RH edge of the
fragment box is never quite in view. Why can't the border simply follow the
width of the text?

Rather than "block" (as you suggested) I tried adding 'display: inline;' to
fragbody and found that the RH edge of the "box" then behaves just as I want
- but unfortunately as the window narrows the margins disappear from the
*LH* edge of the box - both the margin L of the border, and also the padding
between the border and the beginning of the text within the box.

The fragbody is double-divved because in the typical case there is a
preceding caption and a following hyperlink and I want to set some styles on
the whole construction - this is a highly simplified example to illustrate
the problem with the RH border of the fragment box.

Thanks for looking into it
T


-----Original Message-----
From: css-d-boun...@lists.css-discuss.org
[mailto:css-d-boun...@lists.css-discuss.org] On Behalf Of Sarah Atkinson
Sent: Tuesday, 17 February 2009 4:29 a.m.
To: tre...@castingthevoid.com; Untitled
Subject: Re: [css-d] nowrap and border issue in IE6 and/or IE7




On 2/16/09 10:08 AM, "Trevor Nicholls" <tre...@castingthevoid.com> wrote:

> Hi
> 
> 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 and displayed in a colored rectangle with a
> black border.
> 
> Apparently in IE6 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.
> 
> However in IE7 the box shrinks, while the text does not. The user can
scroll
> right to see the rest of the text, but the "box" margin cuts through the
> text.
> 
> Having observed that Firefox 3 and Opera 9 behave similarly to IE7, I
guess
> that IE7 is probably doing the right thing and I am relying on an IE6
quirk.
> The question is, can I implement the same behaviour in IE7?
> 
> Cheers
> Trevor


Try adding to fragbody....
display:block;
  width:100%;



Also why do you double div it?

______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
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 [cs...@lists.css-discuss.org]
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