2

我需要关于如何解决表格布局问题的想法。我想根据选择的语言设置不同的列宽度。

4

3 回答 3

3

您可以拥有特定于语言的 CSS,然后只需根据语言加载适当的 CSS。

在 CSS 中,您可以为表格添加样式以定义布局。

于 2008-10-15T03:41:30.610 回答
1

根据当前选择的语言在 scriplet 中使用 if-else 并放置适当的“td”标签。

希望这就是你要找的!

于 2008-10-15T03:28:57.060 回答
1

一个可变开关,例如:

<%
dim columnWidth
if session("lang") = "eng" then
    columnWidth = 50
else
    columnWidth = 100
end if
%>

<table>
    <tr>
        <td width="<%= columnWidth %>px">[content]</td>
    </tr>
</table>

对于 c#,代码为:

<%
private int columnWidth;
if (session("lang") == "eng") {
    columnWidth = 50;
} else {
    columnWidth = 100;
}
%>
于 2008-10-15T03:38:08.213 回答