日期:2014-05-17  浏览次数:20342 次

后台添加 table 样式不管用
StringBuilder strTitle = new StringBuilder();
string strInfoFormat = string.Empty;
strInfoFormat = "<td style='font-size: 26px; font-weight: bold;'><tr>{0}</tr></td>";
strTitle.Append("<table style='height:50px;'>");
strTitle.AppendFormat(strInfoFormat, model.dwmc);
strTitle.Append("</table>");
return strTitle.ToString();

我在后台写了个往界面添加 table 的东西,为啥运行的时候我设置的样式都不管用了啊

table 后台 样式

------解决方案--------------------
外面套个div吧,兼容所有浏览器
<div style="text-align:center;"> <table style="width:700px;height:50px;margin:0px auto;"> </table> </div>