【问题标题】:Column cut into two lines in Internet explorer在 Internet Explorer 中将列分成两行
【发布时间】:2012-11-09 10:00:24
【问题描述】:

我在 IE 中使用 tablr

<table style="width=74%;table-layout:auto" border="0">
<xsl:for-each select="webpage/param">    
<tr>
 <xsl:if test="@type !='i'">  
    <td class="rowYellow">
    <xsl:if test="@indent !=''">  

        <!-- Generate the appropriate number of indentation -->
        <xsl:variable name="count" select="@indent"/>
        <xsl:for-each select="(//*)[position()&lt;=$count]">
            <xsl:text>&#xA0;</xsl:text>
        </xsl:for-each> 

这段代码在 Mozilla 中运行良好,但在 IE 中,我的专栏分成两行而不是自动布局。

【问题讨论】:

  • white-space:nowrap;放在上面吗?
  • 对不起,没有得到您的宝贵意见,您能解释一下吗
  • -1 糟糕的问题、错误的拼写和错误的标签!
  • 请将 width=74%; 更改为 width: 74%; 您在样式标签中工作,因此您必须使用 css 语法

标签: html css xml internet-explorer xslt


【解决方案1】:

您要做的是为表格单元格设置一些样式。您已经这样做了,但您的代码中有一些基本错误。

首先,请尝试了解一些基本的 HTML 和 CSS。你会在 google 上找到很好的资源,比如这个:http://www.w3.org/Style/Examples/011/firstcss.en.html

【讨论】:

  • 谢谢。我对这个编程很陌生。链接非常基本,非常适合初学者谢谢
【解决方案2】:

有价值的评论展开:

您的列,我假设是一个或多个表列。您不希望其中的文本位于 2 行吗?

添加css规则:

td {
  white-space:nowrap;
}

【讨论】:

  • 是的,只有它的 tabl 列问题,我可以给这个 td { white-space:nowrap; }
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2010-10-09
  • 2018-04-18
  • 2016-03-26
  • 1970-01-01
  • 2017-04-20
  • 1970-01-01
相关资源
最近更新 更多