0

我的 HtmlTable 中有一行只包含一个“OR”字符串/标签/LiteralControl。我希望它比其他行更短,以直观地表明上面和下面的行是同义的(您可以填写上面的行或下面的行),并尝试了几件事(注释掉):

// Create Row 5
var row5 = new HtmlTableRow();
//dynamicTable.Rows[4].Height = 12; // cannot implicitly convert int to str
//dynamicTable.Rows[4].Height = 12.ToString(); <= crash-o-rama
//row5.Height = 6; <= 'cannot convert int to string'
//row5.Height = "2cm"; // <= runs, but doesn't help
row5.Height = "2em";   // <= runs, but doesn't help
var cell5_1 = new HtmlTableCell();
row5.Cells.Add(cell5_1);

// Populate Row 5
LiteralControl orStr = new LiteralControl("&nbsp;&nbsp;&nbsp;OR");
cell5_1.Controls.Add(orStr);
dynamicTable.Rows.Add(row5);

...并且它们都不起作用-无论如何,该行都保持相同的高度。我怎样才能把它压扁一点?

4

0 回答 0