Re: [css-d] Text not wrapping properly [SOLVED]

2009-09-20 Thread James Colannino
James Colannino wrote:
> James Colannino wrote:
>> Hey everyone. I have a bit of a quandary. I have a scroll area
>> implemented with a div box, which itself is inside of a fieldset for a
>> form. I have another div area nested inside of this one with a width of
>> 50%, which should, I assume, make it 50% of the width of the parent div
>> area (the scroll area.)[...]
> 
> So, I have an update.  If the page is loaded with content inside the div
> box, it wraps.  If Javascript adds content to the div box dynamically
> after the page has loaded, the text doesn't wrap.  This happens both in
> Opera and Firefox.
> 
> Weird.  Anybody have any ideas?

Ok, so I have an update.  It turned out that the code I was using was
inserting " "'s in place of true space characters.  The browser
renders them as as spaces, but I guess it's not seen as true whitespace
when the browser decides where to wrap.  Hence, I get one long line with
no true whitespace that can't be wrapped, and I get the horizontal
scrollbar.  I modified the code so that true whitespace was inserted and
that fixed the problem.

Hope this proves to be useful to someone, even if it's found via a
google search years later :)

James
__
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/


Re: [css-d] Text not wrapping properly

2009-09-19 Thread James Colannino
James Colannino wrote:
> Hey everyone. I have a bit of a quandary. I have a scroll area
> implemented with a div box, which itself is inside of a fieldset for a
> form. I have another div area nested inside of this one with a width of
> 50%, which should, I assume, make it 50% of the width of the parent div
> area (the scroll area.)[...]

So, I have an update.  If the page is loaded with content inside the div
box, it wraps.  If Javascript adds content to the div box dynamically
after the page has loaded, the text doesn't wrap.  This happens both in
Opera and Firefox.

Weird.  Anybody have any ideas?

James
__
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-d] Text not wrapping properly

2009-09-19 Thread James Colannino
Hey everyone. I have a bit of a quandary. I have a scroll area
implemented with a div box, which itself is inside of a fieldset for a
form. I have another div area nested inside of this one with a width of
50%, which should, I assume, make it 50% of the width of the parent div
area (the scroll area.)

Below I've posted the CSS, followed by a sample HTML file showing the
hierarchy of elements. In the most deeply nested div box (with a class
of "definition"), I've tried specifying absolute as well as relative
widths, but nothing gets the text to wrap. I've tried replacing that div
box with both p and span elements, all with both relative and absolute
widths, and I just can't get the text to wrap; in Firefox, it always
spills over the side of the scroll area (the parent div area) and causes
the scrollarea to require me to scroll to the right, and in Opera, it
just cuts off beyond the edge of the scroll area without wrapping.

Does anyone know how I can make this work or if anything's wrong with my
code?  Maybe I'm making false assumptions about the behavior I should be
expecting.

Thanks so much!

CSS:

.body {
 position: absolute;
 left: 340px;
 top: 75px;
 width: 600px;
 font-size: 10pt;
 font-family: sans-serif;
}

fieldset.normal {
   background-color: LightSteelBlue;
   width: 100%;
   margin-bottom: 15px;
}

div.definition {
   font-size: 0.85em;
   width: 50%;
   margin: 1%;
}



   

  

 
 


   Text goes here (this is the text that doesn't wrap
according to the  specified width of a definition div box)


 

  



James
__
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/