473,320 Members | 2,024 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,320 software developers and data experts.

partial text display in a cell

1
Hi,

I would like to restrict the text that appears in a cell to the first few letters or a fixed width in pixel. And for other processing reasons I wish the full text to be available in the cell for access via Javascript.

For example, I may have the following text in a cell

IT/Developer Network HTML/CSS Forum

And I may wish that only the first 20 characters be displayed even though the cell contains the full text; or it shows say the first 200px.

Importantly, should be cross-browser compatible.

Hoping there is some CSS way to handle this.

Thanks,

RR
Dec 15 '07 #1
1 4369
AricC
1,892 Expert 1GB
Hi,

I would like to restrict the text that appears in a cell to the first few letters or a fixed width in pixel. And for other processing reasons I wish the full text to be available in the cell for access via Javascript.

For example, I may have the following text in a cell

IT/Developer Network HTML/CSS Forum

And I may wish that only the first 20 characters be displayed even though the cell contains the full text; or it shows say the first 200px.

Importantly, should be cross-browser compatible.

Hoping there is some CSS way to handle this.

Thanks,

RR
Set the width in pixels then use overflow: hidden to hide anything longer than the specified width.
Dec 18 '07 #2

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

Similar topics

3
by: Bjoern Wolfgardt | last post by:
Hi, I am a little bit confused. Maybe someone can explain what I am doing wrong. I have a table with 2 cells in it. In the first cell I have an image. The image is left aligned and centered....
3
by: Craig G | last post by:
what way do you code it? i tried the following but it wouldnt display it lblAdd_info is a hidden field in the cell itself that contains the data i want to display in the tooltip text. i added the...
1
by: Tracey | last post by:
Hi, there My application requires to display multiline text in the cell of datagrid. I set the preferredheight of datagrid's tablsstyle, however, it is fixed. For text longer than that, the rest...
2
by: Stephen | last post by:
Hi, Suppose there is a column in the dataset that is a very large field (say varchar(500)) and i want to display partial information with (....) so that the user can click on it to view for...
3
nirmalsingh
by: nirmalsingh | last post by:
i am usinjg ajax technology with c# code behind. i have created html table using c# just like Response.Write("<table>"); .... .... .... Response.Write("</table>"); i want to display text...
2
by: amitp | last post by:
hi i'm using MS Word2003 for my VB application which is a report. The word documents contains tables and the cells inside the table contain some fields. My application replaces the field values with...
0
by: news | last post by:
I'm trying to preview some HTML formatted text to show the context that a particular search result was found in. (does that make sense?) The idea is to take that HTML and display it as a stream...
1
by: rnakawat | last post by:
I seem to have a problem using the preceding:: on substrings of the value. I'll try to explain with an example: Let's say I had a XML that look like: <Root> <Row> <Cell Name="Street"...
0
by: Kevinst | last post by:
Hello, currently I am working on the following scenario: There is a device connected to my application. That device has a 256x256 pixel display showing graphics and text. Now for each pixel...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.