我試圖縮短某個表中的列的長度。文本溢出:在Internet Explorer中的省略號問題
我使用jQuery的一些添加文本溢出省略號和幾個CSS屬性。
我還使用一些更多的jQuery添加工具提示。 這裏是我的代碼:(!驚喜驚喜!)
$('#table_id tr td:not(:last)').css({
"text-overflow": "ellipsis",
"max-width": "110px",
"overflow": "hidden",
"display" : "block"
}).each(function (index, element) { $(element).attr("title", $(element).text()); });
一切工作在Firefox和Chrome,但細IE7-9呈現文本在它的全長。
任何想法我做錯了什麼? 謝謝!
P.S.
我也嘗試指定「寬度」屬性無濟於事。
嘗試添加'空白:nowrap'和'寬度:100%'。 – rcode