473,837 Members | 1,479 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

wrap text in a table

258 Contributor
Hello everyone
as you see below i have a table which contains some text. The text written in this table comes from a database which is sent by users.
My problem is that if some user writes a text without spaces longer than this table then the table will be stretched but i want the text to be wraped instead ( break )
-------------------------
<table width="100" >
<tr>
<td>
The text comes here...
</td>
</tr>
</table>
Sep 17 '07 #1
6 3941
drhowarddrfine
7,435 Recognized Expert Expert
HTML cannot do this.
Sep 17 '07 #2
Soup
5 New Member
Hello everyone
as you see below i have a table which contains some text. The text written in this table comes from a database which is sent by users.
My problem is that if some user writes a text without spaces longer than this table then the table will be stretched but i want the text to be wraped instead ( break )
-------------------------
<table width="100" >
<tr>
<td>
The text comes here...
</td>
</tr>
</table>
Actually, try the style WORD-BREAK:BREAK-ALL. The breaking happens even if there is no delimiters in the text.

A little Google search revealed this nugget and it just may work.
Sep 18 '07 #3
Deepamathi
3 New Member
Use the style WORD-BREAK:BREAK-ALL; the breaking happens even if there is no delimiters in the text
Sep 19 '07 #4
drhowarddrfine
7,435 Recognized Expert Expert
There is no such thing as "WORD-BREAK" in standard Html.
Sep 20 '07 #5
Soup
5 New Member
There is no such thing as "WORD-BREAK" in standard Html.
Who's talking about HTML? This property is defined in CSS3. Therefore it's a style attribute, not an HTML tag.
Sep 20 '07 #6
drhowarddrfine
7,435 Recognized Expert Expert
Yes, I forgot about that. However, I'm not sure how well it is supported cross browser. CSS3 is still in the draft stage but this has been brought up here before. If someone wants to use this, I would search to make sure it is available in all browsers.
Sep 21 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

1
3158
by: Guru | last post by:
Hi, I am using FOP for creating pdf. I am having a table which has 14 columns. And each column contents may contain any number of chars. My problem is : When the text is having no spaces in between like "thisisalongwordandcouldnotbewrapped", it is overlapping
17
3895
by: black tractor | last post by:
HI there.. l was just wondering, if l place a "table" in the "editable region" of my template, will the text, graphics placed inside the this "table" MOVE BY ITSELF?? l mean, recently l had a "table" insert in my "editable region", have it placed in the "center" of the page.. while it display correctly on my browser, with setting at 1024x768 (IE6),
3
10772
by: JHR | last post by:
Hey all, I'm trying to make a sidebar box float to the right of various items, and for those items to wrap if a user shrinks his browser window. Instead, in every browser I've tried except for Internet Explorer (in Safari, Firefox, and other Mozilla-types), the box ends up overlapping with the second and third rows of the text (which are in an ordered list with some 'display: table-cell' formats defined in order to allow specific...
2
15523
by: foldface | last post by:
(reposting due to unrelated noise in original post) Hi In the example below on a normal size screen everything looks the way you would think it would (on IE6). My problem is what happens when I add more entries into the table (equivilent here to making the IE window smaller) - If you make the window smaller then the first column text starts to wrap, which I don't want
10
72710
by: Lorenzo Thurman | last post by:
I have a table cell that I want to wrap text inside of. I've tried both hard and soft wrap, but Firefox refuses to obey. IE 6&7 handle the wrap just fine. Does anyone know how I can fix this?
5
6750
by: momo | last post by:
say i have the following table: <table width="500"> <tr> <td width="250">this is the text im concerned with</td> <td></td> </tr> </table> i need the width of the columns to STAY at 250 and wrap text that is longer
1
14185
by: maya | last post by:
hi, I have to do a page where there's a paragraph with an img on top left and the text in paragr has to wrap around the image.. pls see screen-shot here... http://www.mayacove.com/css/ss_page.jpg the image itself will be inserted dynamically via a CMS.. but NOT the border around it.. there are no. of ways to do the border, of course (div, table, etc..) problem is how do you make the text wrap around a table or a div?
6
3744
by: Victor | last post by:
Hi all i have a css question about how to wrap a long text by using css. for example I have a very long text like "ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd" there is not white space and line break inside the text. how can I wrap this text and make sure it can be used for most of the browser(IE, FF, sarafi). and another thing, I thought about using js to control the text length for each line. but in my...
1
3077
by: bussasrinivas | last post by:
How to wrap up text shown with a table cell after a certain length intervals ? -------------------------------------------------------------------------------- I have a requirement to wrap a text shown within a table after every 12 characters here is what I have <td width="76"> This is a text that needs to be wrapped after every 12 characters.This is a text that needs to be wrapped after every 12 characters.This is a text that needs to...
15
11623
by: removeps-groups | last post by:
How to wrap text in <ptag if the text has no spaces and is very long? Here is an example: <p>VeryVeryLongVeryVeryLongVeryVeryLongVeryVeryLongVeryVeryLongVeryVeryLongVeryVeryLongVeryVeryLongVeryVeryLongVeryVeryLongVeryVeryLongVeryVeryLongVeryVeryLongVeryVeryLongVeryVeryLongVeryVeryLongVeryVeryLongVeryVeryLong</ p> The above line is so long that it ought to wrap. But because it has no spaces, it does not wrap. Instead the entire text...
0
9830
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9682
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10864
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10562
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10615
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7803
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6989
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4469
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4036
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.