下面的代碼做的伎倆可能會顯示在Internet Explorer中的同一行兩個div:的div上的tableHeader同一線上
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<style>
th
{
border: 0px solid;
font :12px/1.3 "Lucida Grande", Arial, sans-serifw;
font-weight: bold;
padding-left: 5px;
padding-right: 5px;
background :lightgrey;
clear :both;
width: 70px;
}
.thspan
{ display: inline;
float :left;
word-wrap: break-word;
margin-right 25px;
}
.bspan
{ display: inline;
float: right;
width: auto;
}
</style>
</head>
<body>
<table>
<th>
<div class="bspan"><button id="text2"></button></div>
<div class="thspan">text1dskjsdkjfsd-sdfdsf</div>
</th>
</table>
</body>
</html>
但現在不會在Chrome和Firefox ...任何人合作一個想法爲什麼?
感謝
哇,那實際上工作:)。謝謝。只有一個小問題。在Internet Explorer中,按鈕的右邊也會有一個20px的邊界(僅當文本非常長時)(在chrome和firefox中,情況並非如此)。任何想法是什麼造成的? – 2012-02-03 13:58:52