English 中文(简体)
在拖车内使用前tag
原标题:Using pre tag inside td
  • 时间:2012-05-05 20:24:40
  •  标签:
  • html
  • css

我存在一个问题,使用<代码><pre> tag 载于<td>。 我有共同基金数据表和三栏。 我需要所有三个栏都包含预定案文。

If I use <pre> tag the text is shown preformatted as I need but the width of the columns gets much bigger than then the text.

我可以通过具体说明<代码>white-space: pre-line; in <pre> tag s风格,在cs中解决这一问题。 但是,它只与火ox和迷信电公司合作,而神.却无视这种风格。

因此,我的问题是:是否有办法解决<代码>和td>的宽度; which contained <pre> tag within?

EDITED:

My css class:

.dt_row {
    height: 8px;
    margin: 3px 3px 3px 3px;
    color: #000000;
    white-space: pre-line;
}

我的数据表:

    <h:dataTable value="#{searchBean.searchResult.concordances}"
                 var="concordance">

        <h:column>
            <pre class="dt_row">
                #{concordance.left}
            </pre>
        </h:column>

        <h:column>
            <pre class="dt_row" style="color: blue;">
                #{concordance.middle}
            </pre>
        </h:column>

        <h:column>
            <pre class="dt_row">
                #{concordance.right}
            </pre>
        </h:column>

    </h:dataTable>

EDITED:

我找到了解决办法。 我没有使用<代码><pre> tag,我使用了<code>,现在所有数据都完全展示。

最佳回答

< code code 100% 但是,在表层中,这与小屋顶相对,而到场时,带“条形状”的电室也与最长的电线一样广。 如果情况并非如此,你需要确定导致背离缺省的法律,并加以修改。

例如,如果你在<条码>上设定了<条码>width属性或财产,则仅仅删除了这种情形。

问题回答

如何使用<条码>div <pre tag and using a overcc/code> Depende in the div?

浏览器会带来滚动障碍,但我认为,与你有共鸣。





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!