473,383 Members | 1,953 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,383 software developers and data experts.

how to force clipping or wrapping?

I just noticed a bug on my site where if someone enters a continuous string
of characters like
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"

and I have that being rendered into a table with a width set to say.. 100,
it will stretch the table to fit all those characters. Enforcing characters
wouldn't really work cause the cell is allowed to wrap, they can enter a ton
of text if they want to, but when there are that many characters next to
each other... it breaks it. I know I could sit there and count characters
and watch for spaces and determine when something smells bad, but there must
be an easier way to do this.

I have tried explicitly setting the <td> to the desired width, that won't
stop it either.

Any ideas?

Steve
Nov 18 '05 #1
3 1489
I'm afraid the method you described ("sit there and count characters
....") is the only way.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Steve" <st***@nowhere.com> wrote in message
news:#h**************@TK2MSFTNGP12.phx.gbl...
I just noticed a bug on my site where if someone enters a continuous string of characters like
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"

and I have that being rendered into a table with a width set to say.. 100,
it will stretch the table to fit all those characters. Enforcing characters wouldn't really work cause the cell is allowed to wrap, they can enter a ton of text if they want to, but when there are that many characters next to
each other... it breaks it. I know I could sit there and count characters
and watch for spaces and determine when something smells bad, but there must be an easier way to do this.

I have tried explicitly setting the <td> to the desired width, that won't
stop it either.

Any ideas?

Steve

Nov 18 '05 #2
A textarea with cols='50' may solve your problem.
Or style: STYLE="word-wrap:break-word;"
"Steve" <st***@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I just noticed a bug on my site where if someone enters a continuous string of characters like
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"

and I have that being rendered into a table with a width set to say.. 100,
it will stretch the table to fit all those characters. Enforcing characters wouldn't really work cause the cell is allowed to wrap, they can enter a ton of text if they want to, but when there are that many characters next to
each other... it breaks it. I know I could sit there and count characters
and watch for spaces and determine when something smells bad, but there must be an easier way to do this.

I have tried explicitly setting the <td> to the desired width, that won't
stop it either.

Any ideas?

Steve

Nov 18 '05 #3
WOOHOO!!

That worked perfect! It only works in IE, but, to be honest...... for this
site I don't care.

Thanks for the tip!
<TD width="300" style="word-wrap:break-word">

"Guogang" <nospam@no_such_domain.com> wrote in message
news:uu**************@TK2MSFTNGP12.phx.gbl...
A textarea with cols='50' may solve your problem.
Or style: STYLE="word-wrap:break-word;"
"Steve" <st***@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I just noticed a bug on my site where if someone enters a continuous

string
of characters like
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"

and I have that being rendered into a table with a width set to say.. 100, it will stretch the table to fit all those characters. Enforcing

characters
wouldn't really work cause the cell is allowed to wrap, they can enter a

ton
of text if they want to, but when there are that many characters next to
each other... it breaks it. I know I could sit there and count characters and watch for spaces and determine when something smells bad, but there

must
be an easier way to do this.

I have tried explicitly setting the <td> to the desired width, that won't stop it either.

Any ideas?

Steve


Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: John Hunter | last post by:
Does gd lib or gdmodule support clipping? I would like to set a clip rectangle and when I issue drawing commands (like im.polygon) have only the part of the polygon inside the clip rectangle...
0
by: phil cunningham | last post by:
Does anyone know of a good library to handle Polygon clipping in C#. This would require clipping of shapes with FLOAT verteces and we need the capability of clipping one Polygon against another...
2
by: zeyais | last post by:
I am using ASP.net (should be transparent in this case). The page is generated alright. The page has fieldset, divs and tables and other HTML elements like text box, drop downs etc; all are...
1
by: zeyais | last post by:
I am using ASP.net (should be transparent in this case). The page is generated alright. The page has fieldset, divs and tables and other HTML elements like text box, drop downs etc; all are...
2
by: Pugi! | last post by:
I am currently experimenting a bit with clipping (with banners). 1. Is it possible to do more then one clipping on a image. For example: image of 400px x 80 px: var TELLER = 0; function...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...

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.