避免沒斷行文字破壞網頁格式 http://blog.blueshop.com.tw/petlife/
很多人在留言板看過因為訪客輸入較長的英文或連續符號,表格隨著文字變寬,
就破壞了版面美觀,
這個CSS語法可以避免這樣的情形。
複製語法貼於標籤之間
注意的地方是, 這種方式的支援僅 ie only, 另外斷字也會亂斷, 會造成文字有閱讀上的問題!!
代碼: 選擇全部
<style type="text/css">
<!--
td.c1 {word-break:break-all}
-->
</style>
sample1: table boader=1 with word-break:break-all
<table width=200 border=1>
<tr><td class=c1>
<a href=http://blog.blueshop.com.tw/petlife/223/32322/123213233/213213/213213213123 target=_blank>http://blog.blueshop.com.tw/petlife/223/32322/123213233/213213/213213213123</a>
When clients access an ASP.NET page, there are basically two ways to provide them with the information they need:
the ASP.NET page can either obtain information from server resources, such as from data that has been persisted to a database, or
</td>
</tr>
</table>
sample1: table boader=1 without word-break:break-all(standard)
<table width=200 border=1>
<tr><td>
<a href=http://blog.blueshop.com.tw/petlife/223/32322/123213233/213213/213213213123 target=_blank>http://blog.blueshop.com.tw/petlife/223/32322/123213233/213213/213213213123</a>
When clients access an ASP.NET page, there are basically two ways to provide them with the information they need:
the ASP.NET page can either obtain information from server resources, such as from data that has been persisted to a database, or
</td>
</tr>
</table>