473,404 Members | 2,170 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

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 60 characters

here is what I have
<table width="50%">
<tr>
<td width="25%">
This is a text that needs to be wrapped after every 60 characters.This is a text that needs to be wrapped after every 60 characters.This is a text that needs to be wrapped after every 60 characters.
</td>
</tr>
<.table>
The text wraps automatically in IE but I need to make it wrap exactly at sixty characters. So a 240 character long text should end up getting diplayed in 4 lines in IE within the table cell.How do I adjust this table width? Is there any way to do this using CSS or any other ways.

Thanks a lot for your help
Apr 3 '07 #1
2 5546
AricC
1,892 Expert 1GB
I have a requirement to wrap a text shown within a table after 60 characters

here is what I have
<table width="50%">
<tr>
<td width="25%">
This is a text that needs to be wrapped after every 60 characters.This is a text that needs to be wrapped after every 60 characters.This is a text that needs to be wrapped after every 60 characters.
</td>
</tr>
<.table>
The text wraps automatically in IE but I need to make it wrap exactly at sixty characters. So a 240 character long text should end up getting diplayed in 4 lines in IE within the table cell.How do I adjust this table width? Is there any way to do this using CSS or any other ways.

Thanks a lot for your help
Yes, you can apply styles to a table here is a link that should help. Here is another.
Apr 3 '07 #2
drhowarddrfine
7,435 Expert 4TB
You would have to do a little manipulating of the font sizes because you want to make the size of the cell relative to the number of characters and the number of characters on a line is related to the size of the font.

You can set the size of the cell using em which is the size of the current font but if you set the width of the cell as 600px but each character is 1em wide and an em equals 16px then 60 characters equals 960px.

So a bit of a juggling act there.
Apr 3 '07 #3

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

Similar topics

1
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...
3
by: Michael Qiu | last post by:
I hava a select component on my form. the width of the select component is fixed,so if the length of the option's shown string larger than the select component's width,how can i make the shown string...
3
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...
6
by: Johan | last post by:
Dear experts, I am new to c++ (arriving from java) and I am having to implement a data table that contains cells with numbers and cells with text. I would appreciate any general indications...
5
by: coolsti | last post by:
Can someone tell me how to do this if it is possible? I have a table based web site, and I would like to dynamically change the text that is shown in a particular cell of a table. I give the cell...
2
by: Yeah | last post by:
Hi, all! I have a question. I am designing a listing similar to a phone book in HTML. Each listing has periods following it, but they must extend to the end of the table cell, and not wrap. ...
10
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
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...
1
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...
3
by: jinkala | last post by:
hi frnds, i am working on MS Access. can u tell me how to wrap the text in tables. when ever text lenth crosses its cell length then text is trimming.can u tell me how to wrap the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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,...
0
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...
0
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...

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.