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

有帮助吗?

解决方案

变量开关,例如:

<%
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;
}
%>

其他提示

您可以使用特定语言的CSS,然后根据语言加载适当的CSS。

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

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

希望这就是你要找的东西!

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top