Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Wrapping Long Paragraph Text

Status
Not open for further replies.

jtanner

Technical User
Feb 18, 2007
39
US
Hello,

In a table if I am outputting long text entries it will bleed out the side of the control rather than wrapping. I have tried multiple tags unsucessfully (<p>, <div> <table>...<td> etc.). I'll use whatever works.

How can I get a long paragraph of text to wrap in CSS 2.x in both IE and Mozilla?

Thanks for you advice,

JT
 
You need to remove that piece of CSS there. The one I am pointing to right now.

Just as you cannot see my finger pointing to the problem, we cannot see your problem if you do not show us your code.

[small]I do believe original rights for this skit go to Chris Hunt[/small]

___________________________________________________________
[small]Do something about world cancer today: PACT[/small]
 

Ahhhh! The dreaded line 23 bug strikes again!

___________________________________________________________
If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
Steam Engine Prints
 
I concur! If I had a single piece of code failing I should post it to help you guys help me.

In this case I am asking for the "best pratice" to handle this situation. I should have spelled that out. Yep, I have been exhaustively reading manuals and online sources but still do not have a grasp on how this is commonly handled.

Code:
If I have a paragraph of text that I want to display in a browser window in such a way that the text [b][i]wraps[/i][/b] rather than being clipped or bleeding over the edge of the screen.  What are some CSS 2.x options that would achieve this so as it works in both IE 6/7 and Mozilla?

Being new to CSS, if you could give a few examples that be greatly appreciated.


Thanks,

JT
 
The text should wrap around within a table cell unless you are issuing a no-wrap clause in that cell. As the previous posts have stated, showing code which you find does not work, is the fastest way to resolve this type of issue.

Keith
 
Default behaviour is to wrap once the contents of a container reach the width of the container.

You claim this:
I have tried multiple tags unsucessfully (<p>, <div> <table>...<td> etc.). I'll use whatever works.

which tells me you have an example of your problem in code.

Post that code, and we'll see what's going on.

[monkey][snake] <.
 
Code:
<p style="width: 100px;">I am a really tight paragraph and text in me is wrapping.  Does that mean that I am the answer to this puzzle?  Or does it simply mean that OP is still not giving us enough information???</p>

___________________________________________________________
[small]Do something about world cancer today: PACT[/small]
 
I came accross this once. By default the text wraps at a white space character. If there is no white space the browsers do different things.

By default IE just wrapps the text when it gets to the edge and FireFox just prints the text outside the box. IE has had a word-break css attribute for a while to controle this but it only got into the CSS 3.0 standard.

This issue has been in FireFart's bug database since June 2004 but it still ain't fixed. There is also this bug that has been there since April 2002.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top