关于包装字符串的问题 [英] question about wrapping a string

查看:72
本文介绍了关于包装字符串的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这有点偏离主题,但并非完全如此。


i有一个ASP页面,它从数据库中提取文本,将其存储在变量中,

然后使用<%= variable%在html表中写入文本。

问题与包装有关。如果文本行更长

比表(或列)宽,则整个表格被分开并且b / b增长以适应数据。我希望有一个简单的方法来解决这个问题,但

我唯一能找到的东西就是wordwrap标签,只有IE

支持!所以,除非有人在这里知道如何在css / html中处理这个问题,否则
i必须查看字符串的Len(),如果它超过某个

生病的数量必须插入< brat每个第N个字符。

有人有什么想法吗?我的表可能如下所示:


< table width =" 500 +>

< tr>

< td width =" 250">这是与< / td>有关的文字

< td>< / td>

< / tr>

< / table>


i想要< tdto无论如何都要保持250宽!有没有人知道如何在css中这样做?
如果没有,有人可以告诉我如何在每20个字符左右插入< br>'
到我的字符串中吗?


谢谢

解决方案

Joe Reynolds于2006年9月28日在

microsoft.public.inetserver.asp.general写道:


这是一个有点偏离主题,但不是完全的。


i有一个ASP页面,它从数据库中提取文本,将其存储在

变量,然后使用<%= variable%在html

表中写入文本。问题与包装有关。如果

文本的行长于表(或列)的宽度,则整个

表被分开并增长以适应数据。我希望有一个简单的方法用CSS来解决这个问题,但我唯一能找到它的工作

是只有IE支持的wordwrap标签!所以除非有人在这里

知道如何在css / html中处理这个问题,我将不得不看看

Len()的字符串,如果它超过了一定数量的人物生病

必须在每个第N个角色插入一个< brat。有人有任何

想法吗?我的表可能如下所示:


< table width =" 500 +>

< tr>

< td width =" 250">这是与< / td>有关的文字

< td>< / td>

< / tr>

< / table>


i想要< tdto无论如何都要保持250宽!有谁知道

如何在CSS中做到这一点?如果没有,有人可以告诉我我怎么可能每隔20个字符左右插入< br>'到我的字符串中?



完全偏离主题,因为它是客户端的css问题。


请在css NG中询问。

-

Evertjan。

荷兰。

(请将x''改为我的点数emailaddress)


你读过整个问题吗?

i请求帮助解决ASP中的字符串问题。这个话题怎么样?为什么不给你

去阅读整个问题并再次回复



Evertjan。 < ex ************** @ interxnl.netwrote in message

news:Xn **************** **** @ 194.109.133.242 ...


Joe Reynolds于2006年9月28日在

microsoft.public.inetserver.asp上写道.general:


>这是一个有点偏离主题,但不是完全的。

我有一个从数据库中提取文本的ASP页面,将其存储在
变量中,然后使用<%= variable%将文本写入html
表中。问题与包装有关。如果
文本的行长于表(或列)的宽度,那么整个
表会被分开并增长以适应数据。我希望有一个简单的方法来解决这个问题,但我能找到的唯一可行的工作
是只有IE支持的wordwrap标签!所以,除非有人在这里知道我如何在css / html中处理这个问题,否则我将不得不看一下字符串的Len(),如果它超过一定数量的字符生病了必须插入一个< brat每个第N个字符。有没有人有任何想法?我的表格可能如下所示:

< table width =" 500 +>
< tr>
< td width =" 250"> this是关于< / td>
< td>< / td>
< / tr>
< / table>

我的文字想要< tdto无论如何都要保持250宽!有谁知道
如何在CSS中做到这一点?如果没有,有人可以告诉我如何在每20个字符左右插入< br>'到我的字符串中吗?



完全偏离主题,因为它是客户端问题。


请在css NG中询问。


-

Evertjan。

荷兰。

(请更改x''es我的电子邮件中的点数)



Joe Reynolds于2006年9月28日在

microsoft.public.inetserver上写道.asp.general:


" Evertjan。" < ex ************** @ interxnl.netwrote in message

news:Xn **************** **** @ 194.109.133.242 ...


> Joe Reynolds于2006年9月28日写在
microsoft.public.inetserver.asp.general :


>>这有点偏离主题,但并非完全如此。

我有一个从数据库中提取文本的ASP页面,将其存储在
变量中,然后使用<%= variable%将文本写入html
表中。问题与包装有关。如果
文本的行长于表(或列)的宽度,那么整个
表会被分开并增长以适应数据。我希望有一个简单的方法来解决这个问题,但我唯一能找到的工作就是IE浏览器支持的wordwrap标签!所以除非有人在这里知道如何在css / html中处理这个问题,否则我将不得不在字符串的Len()处查看
它是否超过一定数量的
字符我必须插入一个< brat每个N字符。有没有人有任何想法?我的表格可能如下所示:

< table width =" 500 +>
< tr>
< td width =" 250"> this是关于< / td>
< td>< / td>
< / tr>
< / table>

我的文字想要< tdto无论如何都要保持250宽!有没有人知道如何在CSS中做到这一点?如果没有,有人可以告诉我如何在每20个字符左右插入< br>'到我的字符串中?


这完全不是主题,因为它是客户端的css问题。

请在css NG中询问。



[请不要使用usenet。更正。]


你读了整个问题吗?

我在ASP中寻求帮助。这个话题怎么样?为什么不用

你去看完整个问题并再次回复



所以如果我问...

<%=" Goede morgen" %>

请用英文翻译文字?

....这是一个asp问题吗?


不,你的问题可以和css一起解决,

就像我上面的新闻中的例子:sci.lang.translation。


所以请在新闻中询问:comp .infosystems。 www.authoring.stylesheets


>>如果没有,有人可以告诉我如何将< br>'插入我的每20个字符左右的字符串?



所以当我回答css是解决方案时,

Q完全偏离主题,

自if not以来当有css解决方案时不适用,

,如你自己规定的那样!


>>可能会在每20个字符左右将< br>'插入到我的字符串中?



....无论如何都应该让你的字符串不可读。


-

Evertjan。

荷兰。

(请在我的电子邮件地址中将x'变为点数)


this is kinda off topic, but not totally.

i have an ASP page that pulls text from a database, stores it in a variable,
then uses <%= variable %to write the text inside an html table. the
problem im having has to do with wrapping. if the line of text is longer
than the table (or column) is wide, then the whole table is blown apart and
grows to fit the data. i was hoping for an easy way to fix this with CSS but
the only thing i can find that works is the wordwrap tag that ONLY IE
supports! so unless someone here knows how i can deal with this in css/html,
i will have to look at the Len() of the string and if its over a certain
amount of characters ill have to insert a <brat every Nth character. does
anyone have any ideas? my table might look like this:

<table width="500+>
<tr>
<td width="250">this is the text im concerned with</td>
<td></td>
</tr>
</table>

i want that <tdto stay at 250 wide no matter what! does anyone know how to
do this in css? and if not, can someone show me how i might insert <br>''s
into my string at every 20th character or so?

thanks

解决方案

Joe Reynolds wrote on 28 Sep 2006 in
microsoft.public.inetserver.asp.general:

this is kinda off topic, but not totally.

i have an ASP page that pulls text from a database, stores it in a
variable, then uses <%= variable %to write the text inside an html
table. the problem im having has to do with wrapping. if the line of
text is longer than the table (or column) is wide, then the whole
table is blown apart and grows to fit the data. i was hoping for an
easy way to fix this with CSS but the only thing i can find that works
is the wordwrap tag that ONLY IE supports! so unless someone here
knows how i can deal with this in css/html, i will have to look at the
Len() of the string and if its over a certain amount of characters ill
have to insert a <brat every Nth character. does anyone have any
ideas? my table might look like this:

<table width="500+>
<tr>
<td width="250">this is the text im concerned with</td>
<td></td>
</tr>
</table>

i want that <tdto stay at 250 wide no matter what! does anyone know
how to do this in css? and if not, can someone show me how i might
insert <br>''s into my string at every 20th character or so?

It is totally off topic, since it is a clientside css matter.

Please ask in a css NG.
--
Evertjan.
The Netherlands.
(Please change the x''es to dots in my emailaddress)


did you read the whole problem?
i asked for help with a string in ASP. how is that off topic? why dont you
go read the whole problem and respond again


"Evertjan." <ex**************@interxnl.netwrote in message
news:Xn********************@194.109.133.242...

Joe Reynolds wrote on 28 Sep 2006 in
microsoft.public.inetserver.asp.general:

>this is kinda off topic, but not totally.

i have an ASP page that pulls text from a database, stores it in a
variable, then uses <%= variable %to write the text inside an html
table. the problem im having has to do with wrapping. if the line of
text is longer than the table (or column) is wide, then the whole
table is blown apart and grows to fit the data. i was hoping for an
easy way to fix this with CSS but the only thing i can find that works
is the wordwrap tag that ONLY IE supports! so unless someone here
knows how i can deal with this in css/html, i will have to look at the
Len() of the string and if its over a certain amount of characters ill
have to insert a <brat every Nth character. does anyone have any
ideas? my table might look like this:

<table width="500+>
<tr>
<td width="250">this is the text im concerned with</td>
<td></td>
</tr>
</table>

i want that <tdto stay at 250 wide no matter what! does anyone know
how to do this in css? and if not, can someone show me how i might
insert <br>''s into my string at every 20th character or so?


It is totally off topic, since it is a clientside css matter.

Please ask in a css NG.
--
Evertjan.
The Netherlands.
(Please change the x''es to dots in my emailaddress)



Joe Reynolds wrote on 28 Sep 2006 in
microsoft.public.inetserver.asp.general:

"Evertjan." <ex**************@interxnl.netwrote in message
news:Xn********************@194.109.133.242...

>Joe Reynolds wrote on 28 Sep 2006 in
microsoft.public.inetserver.asp.general:

>>this is kinda off topic, but not totally.

i have an ASP page that pulls text from a database, stores it in a
variable, then uses <%= variable %to write the text inside an html
table. the problem im having has to do with wrapping. if the line of
text is longer than the table (or column) is wide, then the whole
table is blown apart and grows to fit the data. i was hoping for an
easy way to fix this with CSS but the only thing i can find that
works is the wordwrap tag that ONLY IE supports! so unless someone
here knows how i can deal with this in css/html, i will have to look
at the Len() of the string and if its over a certain amount of
characters ill have to insert a <brat every Nth character. does
anyone have any ideas? my table might look like this:

<table width="500+>
<tr>
<td width="250">this is the text im concerned with</td>
<td></td>
</tr>
</table>

i want that <tdto stay at 250 wide no matter what! does anyone
know how to do this in css? and if not, can someone show me how i
might insert <br>''s into my string at every 20th character or so?


It is totally off topic, since it is a clientside css matter.

Please ask in a css NG.

[please do not toppost on usenet. Corrected.]

did you read the whole problem?
i asked for help with a string in ASP. how is that off topic? why dont
you go read the whole problem and respond again

so if I ask ...
<% = "Goede morgen" %>
Please translate the text in English?
.... it is an asp problem?

No, your problem can and schould be tackled with css,
like my above example in news:sci.lang.translation.

So please ask in news:comp.infosystems.www.authoring.stylesheets.

>>and if not, can someone show me how i
might insert <br>''s into my string at every 20th character or so?

So as I answered that css is the solution,
the Q is totally off topic,
since the "if not" does not apply when there is an css solution,
as you stipulated yourself!

>>might insert <br>''s into my string at every 20th character or so?

.... which should make your string unreadable anyway.

--
Evertjan.
The Netherlands.
(Please change the x''es to dots in my emailaddress)


这篇关于关于包装字符串的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆