Welcome Guest ( Log In | Register)



2 Pages V  < 1 2  
Reply to this topicStart new topic
> Word Wrap Text In Div.
reatum
post Oct 3 2005, 11:36 PM
Post #11


Member [Level 1]
****

Group: Members
Posts: 63
Joined: 3-October 05
Member No.: 12,515



QUOTE
i use 2 div's for the page layout. One for navigation and one for the contents.

html Code:

Original - html Code:

CODE
  <div width="10%" style="position: absolute; left: 2%;"> bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb </div> <div width="86%" style="position: absolute; left: 14%;"> bbbb </div>


But now the b's wont stay within their div-element. I want lines that doesnt fit on one line within the divto wrap to the next line.

How can i do this?
Thanks,kvarnerexpress


all you need is:

CODE
  <div width="10%" style="position: absolute; left: 2%; word-wrap:break-word;"> bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb </div> <div width="86%" style="position: absolute; left: 14%;word-wrap:break-word;"> bbbb </div>


that will fix your problem i hope let me know
Go to the top of the page
 
+Quote Post
ashiezai
post Oct 3 2005, 11:47 PM
Post #12


King of My WOrld
*********

Group: Members
Posts: 482
Joined: 11-October 04
Member No.: 1,665



hi there ... thanks for the tutorial .. will tryi it out :0
Go to the top of the page
 
+Quote Post
Tyssen
post Oct 4 2005, 02:46 AM
Post #13



***********

Group: Members
Posts: 1,161
Joined: 9-May 05
From: Brisbane, QLD
Member No.: 6,818



QUOTE(Re_Atum @ Oct 4 2005, 09:36 AM)
CODE
  <div width="10%" style="position: absolute; left: 2%; word-wrap:break-word;"> bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb </div> <div width="86%" style="position: absolute; left: 14%;word-wrap:break-word;"> bbbb </div>


That only works in IE/WIN and Safari 1.3+.
Go to the top of the page
 
+Quote Post
iGuest
post Oct 18 2007, 08:45 PM
Post #14


Hail Caesar!
*********************

Group: Members
Posts: 5,876
Joined: 21-September 07
Member No.: 50,369



Try using <span></span> around your text

-FooSoup
Go to the top of the page
 
+Quote Post
iGuest
post Jan 21 2008, 06:10 PM
Post #15


Hail Caesar!
*********************

Group: Members
Posts: 5,876
Joined: 21-September 07
Member No.: 50,369



Use overflow
Word Wrap Text In Div.

Replying to Tyssen

There is a style attribute 'overflow' which you can use to accomplish this. There are 3 values of this attribute viz. Auto, scroll and hidden. If you want only scroll to be present horizontally, you can use overflow-x, or overflow-y as per your case. Read this for further information (http://msdn2.Microsoft.Com/en-us/library/ms534312(VS.85).Aspx)

-reply by Gaurav
Go to the top of the page
 
+Quote Post
iGuest
post Feb 22 2008, 06:00 AM
Post #16


Hail Caesar!
*********************

Group: Members
Posts: 5,876
Joined: 21-September 07
Member No.: 50,369



how wrap the text content inside the div tag?
Word Wrap Text In Div.

Sir
I developed a site for company.The contents are displayed dynamically. With the help of Ajax.Here the contet are from Databse and placed inside "div tag".
Which are inside the "table". The content stored in the DB is in html format.
So the problem is SOME TIMES IF THE CONTENT'S(table ) WIDTH IS GREATER THAN THE SPECIFIED SIZE OF THE table(USER SIDE) THEN THE ALIGNMENT FULLY CHANGED.

THE CONTENT FROM THE DTATABASE COULD NOT OCCUPY THE SPECIFIED SPACE IN DISPLAY SIDE(user side). THE CONTENT COULD NOT WRAP and CANT PACED INSIDE THE TABLE.
Please help me how to wrap the content inside the table.

<td width="600" height="400px" bgcolor="#FFFFFF" colspan="2" >
<div id="txtHint" style="width:595; vertical-align:top ;" >
//CONTENT FROM DB
//AJAX TECHNOLOGY USED, the content paced in <div>
</div></td>

Plese help me
Saami
Go to the top of the page
 
+Quote Post
iGuest
post Sep 2 2008, 12:57 PM
Post #17


Hail Caesar!
*********************

Group: Members
Posts: 5,876
Joined: 21-September 07
Member No.: 50,369



text should be fixed inside div
Word Wrap Text In Div.

I need the text to be fit inside the div.Ie if I'm giving a long text the div should not expand and the words should fit inside and when I'm taking the mouse over the full text should be visible

-reply by ruby
Go to the top of the page
 
+Quote Post

2 Pages V  < 1 2
Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Glow Text(2)
  2. Select All Text In A Form Field On Click(1)
  3. Text Problem(6)
  4. Centered Div Layout Issues(2)
  5. Any Advice From Experts?(3)


 



-