 |
| ASP Forms As of Oct 5, 2005, this forum is now locked. Please use "Classic ASP beginner" at http://p2p.wrox.com/forum.asp?FORUM_ID=54 or "Classic ASP Professional" http://p2p.wrox.com/forum.asp?FORUM_ID=56 instead. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP Forms section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

September 24th, 2004, 08:20 AM
|
|
Friend of Wrox
|
|
Join Date: Sep 2004
Posts: 104
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
wrapping text
Hi All,
I have a problem. If use enters word of size 40 charcters more than that while displyaing it is distrbing table structure. I want to wrap the text and get into the next line. Here I am using "wrap=hard" attrubute. Even then That is not getting to the 2nd line. I know that there will be no word of size of 40 or more. But testers will try for that. I want a quick solution for that.
Thanks
Suresh
|
|

September 24th, 2004, 05:27 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
|
|
I would say, you use width attribute to achieve that. Table element support just NOWRAP attribute, which is boolean and if present, doesn't wrap the text, if absent it wraps the text within the cell for a given width. So it is all to do with WIDTH attribute and omit the WRAP related attribute there.
Hope that helps.
Cheers!
_________________________
- Vijay G
Strive for Perfection
|
|

September 25th, 2004, 02:55 AM
|
|
Friend of Wrox
|
|
Join Date: Sep 2004
Posts: 104
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi Vijay,
Even i assign width = 30%, If That text entered is more than that it is crossing that limit of 30% and it is going beyond the screen and a scroll bar is appear at the bottom of the page.
Any Help..
Thanks
Suresh
|
|

September 25th, 2004, 08:45 AM
|
|
Authorized User
|
|
Join Date: Apr 2004
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
do not put any attribute for warp. The table will automatically warp it. i.e
<td> // no attribute for warp
this is the 40 character text
</td>
From
Burhan
|
|

September 25th, 2004, 10:00 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Suresh, you will have to set the width for all the <TD>s there. All together should sum up to 100%. If not specified width for the other <TD>s within this <table>, then for any lengthy line this would adjust with the width of the other TDs. Another way(reliable) is to specify width in pixels, though that is not recommended as works fine for a fixed resolution.
Hope that helps.
Cheers!
_________________________
- Vijay G
Strive for Perfection
|
|

September 28th, 2004, 06:42 AM
|
|
Friend of Wrox
|
|
Join Date: Sep 2004
Posts: 104
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi all,
Even i gave width attribute all the columns and sum of all is equal to 100%, if i give a text of length 40 characters with out space it is not getting wrapped. That you can test on your system also. Even i dont use width attribute the same thing happening.
Any more ideas..
Thanks
Suresh
|
|

September 28th, 2004, 06:59 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
|
|
try adding the CSS style "word-wrap: break-word;" to the TD. This only works, though, if you have a fixed width setting (e.g. pixels) not a % setting.
This is really a problem for the CSS or HTML forums.
|
|

September 28th, 2004, 07:28 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
|
|
sorry, just noticed that word-wrap is a microsoft only css extension, only works on IE5.5+
|
|
 |