线包装 [英] Line Wrapping

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

问题描述

有没有办法阻止IE强制换行?在下面的列表2中,

您注意到''.jpg''的表背景图像扩展开始一个新行,

而不是保持在同一行上'的文件名。同样的情况发生在我的

javascript onclick事件中,IE强制换行并打破我的代码。在我的

asp代码中,你注意到我正在插入换行符,但IE似乎做了它想要的b / b
。我应该注意,下面的HTML结果实际上是1个40左右的表格

asp构建为字符串。


我提到这是因为有些表得到了没有换行符渲染

跟随''jpg''和javascript代码。我的问题是,当IE强制下面的线路断开时,代码不能正常工作。


有什么想法吗?


上市1 - 代码


ColorInfo = ColorInfo& "&table; table border = 0

background ="" images / prints / thumb_" &安培; RS10(choiceData1)& " .jpg""

style =''border:solid 1pt#000000''cellpadding = 0 cellspacing = 0>" &安培; chr(13)&

chr(10)

ColorInfo = ColorInfo& "< TR>< TD>" &安培; chr(13)& chr(10)

ColorInfo = ColorInfo& "< a href =""""

onclick ="" javascript :PW(''pop_print.asp?print =" & RS10(" choiceData1")&

"'',310,400); return false;"">" &安培; chr(13)& chr(10)

ColorInfo = ColorInfo& "< img src ="" images / filler.gif"" width = 60

height = 40 border = 0>< / a>" &安培; chr(13)& chr(10)

ColorInfo = ColorInfo& "< / TD>< / TR>< /表>< / TR>" &安培; chr(13)& chr(10)

ColorInfo = ColorInfo& "< tr>< td align = center>< font

face ="" verdana,sans-serif""大小= 1>" &安培;替换(RS10(choiceName),

,< br>,1,1)& "< /字体>< / TD>< / TR>< /表>< / TD>" &安培; chr(13)& chr(10)

上市2 - 结果


< table border = 0 background =" images / prints / thumb_Abbey

..jpg style =''border:solid 1pt#000000''cellpadding = 0 cellspacing = 0>

< tr>< td>

< a href =" " onclick =" javascript :PW(''pop_print.asp?print = Abbey

'',310,400); return false;">

< img src =" images / filler.gif" width = 60 height = 40 border = 0>< / a>

< / td>< / tr>< / table>

Is there a way to prevent IE from forcing a line break? Below in LISTING 2,
you notice the table background image extention of ''.jpg'' begins a new line,
instead of staying on the same line as it''s file name. Same happens with my
javascript onclick event, IE forces a line break and breaks my code. In my
asp code, you notice I''m inserting line breaks, but IE seems to do what it
wants. I should note, the below HTML results is actually 1 table of 40 or so
that asp builds as a string.

I mention that because some tables get rendered without line breaks
following the ''jpg'' and javascript code. My prolem is that when IE forces
line breaks as below, the code doesn'' work.

Any ideas?

LISTING 1 - CODE

ColorInfo = ColorInfo & "<table border=0
background=""images/prints/thumb_" & RS10("choiceData1") & ".jpg""
style=''border:solid 1pt #000000'' cellpadding=0 cellspacing=0>" & chr(13) &
chr(10)
ColorInfo = ColorInfo & "<tr><td>" & chr(13) & chr(10)
ColorInfo = ColorInfo & "<a href=""""
onclick=""javascript:PW(''pop_print.asp?print=" & RS10("choiceData1") &
"'',310,400);return false;"">" & chr(13) & chr(10)
ColorInfo = ColorInfo & "<img src=""images/filler.gif"" width=60
height=40 border=0></a>" & chr(13) & chr(10)
ColorInfo = ColorInfo & "</td></tr></table></tr>" & chr(13) & chr(10)
ColorInfo = ColorInfo & "<tr><td align=center><font
face=""verdana,sans-serif"" size=1>" & Replace(RS10("choiceName"),"
","<br>",1,1) & "</font></td></tr></table></td>" & chr(13) & chr(10)
LISTING 2 - RESULTS

<table border=0 background="images/prints/thumb_Abbey
..jpg" style=''border:solid 1pt #000000'' cellpadding=0 cellspacing=0>
<tr><td>
<a href="" onclick="javascript:PW(''pop_print.asp?print=Abbey
'',310,400);return false;">
<img src="images/filler.gif" width=60 height=40 border=0></a>
</td></tr></table>

推荐答案

把它放在一个带有NOWRAP的表格单元格上


-

Curt Christianson

网站&脚本: http://www.Darkfalz.com

博客: http://blog.Darkfalz.com

"斯科特" < SB ***** @ mileslumber.com>在消息中写道

新闻:好的************* @ TK2MSFTNGP15.phx.gbl ...
put it in a Table Cell with NOWRAP on

--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"scott" <sb*****@mileslumber.com> wrote in message
news:Ok*************@TK2MSFTNGP15.phx.gbl...
有没有办法预防IE强行断线?在下面的LISTING
2中,您注意到''.jpg''的表背景图像扩展开始一个新的
行,而不是与它的文件名保持在同一行。同样的事情发生了我的javascript onclick事件,IE强制换行并打破我的代码。在我的asp代码中,你注意到我正在插入换行符,但IE似乎可以做它想做的事情。我应该注意,下面的HTML结果实际上是一个40左右的表,asp构建为一个字符串。

我提到这是因为有些表没有换行而呈现
关注''jpg''和javascript代码。我的问题是,当IE强制下线换行时,代码不起作用。

任何想法?

上市1 - 代码

ColorInfo = ColorInfo& "&table; table border = 0
background ="" images / prints / thumb_" &安培; RS10(choiceData1)& " .jpg""
style =''border:solid 1pt#000000''cellpadding = 0 cellspacing = 0>" &安培; chr(13)&
chr(10)
ColorInfo = ColorInfo& "< TR>< TD>" &安培; chr(13)& chr(10)
ColorInfo = ColorInfo& "< a href =""""
onclick ="" javascript :PW(''pop_print.asp?print ="& RS10( " choiceData1")&
"'',310,400); return false;"">" &安培; chr(13)& chr(10)
ColorInfo = ColorInfo& "< img src ="" images / filler.gif"" width = 60
height = 40 border = 0>< / a>" &安培; chr(13)& chr(10)
ColorInfo = ColorInfo& "< / TD>< / TR>< /表>< / TR>" &安培; chr(13)& chr(10)
ColorInfo = ColorInfo& "< tr>< td align = center>< font
face ="" verdana,sans-serif""大小= 1>" &安培;替换(RS10(choiceName),
,< br>,1,1)& "< /字体>< / TD>< / TR>< /表>< / TD>" &安培; chr(13)& chr(10)

上市2 - 结果

< table border = 0 background =" images / prints / thumb_Abbey
.jpg" style =''border:solid 1pt#000000''cellpadding = 0 cellspacing = 0>
< tr>< td>
< a href ="" onclick =" javascript :PW(''pop_print.asp?print = Abbey
'',310,400); return false;">
< img src = "图像/ filler.gif" width = 60 height = 40 border = 0>< / a>
< / td>< / tr>< / table>
Is there a way to prevent IE from forcing a line break? Below in LISTING
2, you notice the table background image extention of ''.jpg'' begins a new
line, instead of staying on the same line as it''s file name. Same happens
with my javascript onclick event, IE forces a line break and breaks my
code. In my asp code, you notice I''m inserting line breaks, but IE seems
to do what it wants. I should note, the below HTML results is actually 1
table of 40 or so that asp builds as a string.

I mention that because some tables get rendered without line breaks
following the ''jpg'' and javascript code. My prolem is that when IE forces
line breaks as below, the code doesn'' work.

Any ideas?

LISTING 1 - CODE

ColorInfo = ColorInfo & "<table border=0
background=""images/prints/thumb_" & RS10("choiceData1") & ".jpg""
style=''border:solid 1pt #000000'' cellpadding=0 cellspacing=0>" & chr(13) &
chr(10)
ColorInfo = ColorInfo & "<tr><td>" & chr(13) & chr(10)
ColorInfo = ColorInfo & "<a href=""""
onclick=""javascript:PW(''pop_print.asp?print=" & RS10("choiceData1") &
"'',310,400);return false;"">" & chr(13) & chr(10)
ColorInfo = ColorInfo & "<img src=""images/filler.gif"" width=60
height=40 border=0></a>" & chr(13) & chr(10)
ColorInfo = ColorInfo & "</td></tr></table></tr>" & chr(13) & chr(10)
ColorInfo = ColorInfo & "<tr><td align=center><font
face=""verdana,sans-serif"" size=1>" & Replace(RS10("choiceName"),"
","<br>",1,1) & "</font></td></tr></table></td>" & chr(13) & chr(10)
LISTING 2 - RESULTS

<table border=0 background="images/prints/thumb_Abbey
.jpg" style=''border:solid 1pt #000000'' cellpadding=0 cellspacing=0>
<tr><td>
<a href="" onclick="javascript:PW(''pop_print.asp?print=Abbey
'',310,400);return false;">
<img src="images/filler.gif" width=60 height=40 border=0></a>
</td></tr></table>



我试过了,但正如你在下面看到的,它没有效果。有没有什么方法可以将我的html结构化为我的html,这样NOWRAP会解决我的问题吗?我知道它是如何使用常规文本的,但是我的情况有点不同。


< table border = 0>< tr>< td NOWRAP align = center>

< table border = 0 background =" images / prints / thumb_Abbey

..jpg" style =''border:solid 1pt#000000''cellpadding = 0 cellspacing = 0>

< tr>< td NOWRAP>< a href ="" onclick =" javascript :PW(''pop_print.asp?print = Abbey

'',310,400); return false;">

< img src =" images / filler.gif" width = 60 height = 40 border = 0>< / a>

< / td>< / tr>< / table>< / tr>

< tr>< td align = center>< font face =" verdana,sans-serif" size = 1> Abbey< br>(AYSP)

< / font>< / td>< / tr>< / table>

" Curt_C [MVP] QUOT; < software_AT_darkfalz.com>在消息中写道

news:uJ ************* @ TK2MSFTNGP12.phx.gbl ...
I tried it, but as you see below, it had no effect. is there any way to
structure my below html so the NOWRAP will work for my problem? i see how it
works with regular text, but my case is a little different.

<table border=0><tr><td NOWRAP align=center>
<table border=0 background="images/prints/thumb_Abbey
..jpg" style=''border:solid 1pt #000000'' cellpadding=0 cellspacing=0>
<tr><td NOWRAP><a href="" onclick="javascript:PW(''pop_print.asp?print=Abbey
'',310,400);return false;">
<img src="images/filler.gif" width=60 height=40 border=0></a>
</td></tr></table></tr>
<tr><td align=center><font face="verdana,sans-serif" size=1>Abbey<br>(AYSP)
</font></td></tr></table>
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:uJ*************@TK2MSFTNGP12.phx.gbl...
把它放在表格单元格中与NOWRAP一起

-
Curt Christianson
网站&脚本: http://www.Darkfalz.com
博客: http://blog.Darkfalz.com

" scott" < SB ***** @ mileslumber.com>在消息中写道
新闻:好的************* @ TK2MSFTNGP15.phx.gbl ...
put it in a Table Cell with NOWRAP on

--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"scott" <sb*****@mileslumber.com> wrote in message
news:Ok*************@TK2MSFTNGP15.phx.gbl...
有没有办法阻止IE强制执行越线?在下面的LISTING
2中,您注意到''.jpg''的表背景图像扩展开始一个新的
行,而不是与它的文件名保持在同一行。同样的事情发生了我的javascript onclick事件,IE强制换行并打破我的代码。在我的asp代码中,你注意到我正在插入换行符,但IE似乎可以做它想做的事情。我应该注意,下面的HTML结果实际上是一个40左右的表,asp构建为一个字符串。

我提到这是因为有些表没有换行而呈现
关注''jpg''和javascript代码。我的问题是,当IE强制下线换行时,代码不起作用。

任何想法?

上市1 - 代码

ColorInfo = ColorInfo& "&table; table border = 0
background ="" images / prints / thumb_" &安培; RS10(choiceData1)& " .jpg""
style =''border:solid 1pt#000000''cellpadding = 0 cellspacing = 0>" &安培; chr(13)
& chr(10)
ColorInfo = ColorInfo& "< TR>< TD>" &安培; chr(13)& chr(10)
ColorInfo = ColorInfo& "< a href =""""
onclick ="" javascript :PW(''pop_print.asp?print ="& RS10( " choiceData1")&
"'',310,400); return false;"">" &安培; chr(13)& chr(10)
ColorInfo = ColorInfo& "< img src ="" images / filler.gif"" width = 60
height = 40 border = 0>< / a>" &安培; chr(13)& chr(10)
ColorInfo = ColorInfo& "< / TD>< / TR>< /表>< / TR>" &安培; chr(13)& chr(10)
ColorInfo = ColorInfo& "< tr>< td align = center>< font
face ="" verdana,sans-serif""大小= 1>" &安培;替换(RS10(choiceName),
,< br>,1,1)& "< /字体>< / TD>< / TR>< /表>< / TD>" &安培; chr(13)& chr(10)

上市2 - 结果

< table border = 0 background =" images / prints / thumb_Abbey
.jpg" style =''border:solid 1pt#000000''cellpadding = 0 cellspacing = 0>
< tr>< td>
< a href ="" onclick =" javascript :PW(''pop_print.asp?print = Abbey
'',310,400); return false;">
< img src = "图像/ filler.gif" width = 60 height = 40 border = 0>< / a>
< / td>< / tr>< / table>
Is there a way to prevent IE from forcing a line break? Below in LISTING
2, you notice the table background image extention of ''.jpg'' begins a new
line, instead of staying on the same line as it''s file name. Same happens
with my javascript onclick event, IE forces a line break and breaks my
code. In my asp code, you notice I''m inserting line breaks, but IE seems
to do what it wants. I should note, the below HTML results is actually 1
table of 40 or so that asp builds as a string.

I mention that because some tables get rendered without line breaks
following the ''jpg'' and javascript code. My prolem is that when IE forces
line breaks as below, the code doesn'' work.

Any ideas?

LISTING 1 - CODE

ColorInfo = ColorInfo & "<table border=0
background=""images/prints/thumb_" & RS10("choiceData1") & ".jpg""
style=''border:solid 1pt #000000'' cellpadding=0 cellspacing=0>" & chr(13)
& chr(10)
ColorInfo = ColorInfo & "<tr><td>" & chr(13) & chr(10)
ColorInfo = ColorInfo & "<a href=""""
onclick=""javascript:PW(''pop_print.asp?print=" & RS10("choiceData1") &
"'',310,400);return false;"">" & chr(13) & chr(10)
ColorInfo = ColorInfo & "<img src=""images/filler.gif"" width=60
height=40 border=0></a>" & chr(13) & chr(10)
ColorInfo = ColorInfo & "</td></tr></table></tr>" & chr(13) & chr(10)
ColorInfo = ColorInfo & "<tr><td align=center><font
face=""verdana,sans-serif"" size=1>" & Replace(RS10("choiceName"),"
","<br>",1,1) & "</font></td></tr></table></td>" & chr(13) & chr(10)
LISTING 2 - RESULTS

<table border=0 background="images/prints/thumb_Abbey
.jpg" style=''border:solid 1pt #000000'' cellpadding=0 cellspacing=0>
<tr><td>
<a href="" onclick="javascript:PW(''pop_print.asp?print=Abbey
'',310,400);return false;">
<img src="images/filler.gif" width=60 height=40 border=0></a>
</td></tr></table>




scott写道:
有没有办法阻止IE强制换行?在下面的
LISTING 2中,你注意到''.jpg''表的背景图像延伸开始一个新行,而不是和它的文件名在同一行上
名称...

background ="" images / prints / thumb_" &安培; RS10(choiceData1)& " .jpg""

< table border = 0 background =" images / prints / thumb_Abbey
.jpg" style =''border:solid 1pt#000000''cellpadding = 0 cellspacing = 0>
Is there a way to prevent IE from forcing a line break? Below in
LISTING 2, you notice the table background image extention of ''.jpg''
begins a new line, instead of staying on the same line as it''s file
name...

background=""images/prints/thumb_" & RS10("choiceData1") & ".jpg""

<table border=0 background="images/prints/thumb_Abbey
.jpg" style=''border:solid 1pt #000000'' cellpadding=0 cellspacing=0>




您确定源不包含换行符吗?这有效吗

更好吗?


...... &安培;修剪(RS10.Fields(" choiceData1")。Value)& " .jpg""


-

Dave Anderson


未经请求的商业电子邮件将在费用为



Are you certain the source does not contain the line break? Does this work
any better?

..." & Trim(RS10.Fields("choiceData1").Value) & ".jpg""

--
Dave Anderson

Unsolicited commercial email will be read at a cost of


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

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