gpt4 book ai didi

php - CSS 空白 : nowrap not working in IE

转载 作者:太空宇宙 更新时间:2023-11-03 18:17:36 27 4
gpt4 key购买 nike

在 IE 中使用 CSS nowrap 在 IE 中出现问题,在 Chrome 中完美运行。任何人都可以提供帮助,使其在 IE 和 Chrome 中没有任何包装地呈现吗?

HTML

<div id="sub_cont"></div>

CSS

#content{
height:14px;
text-align: left;
text-decoration: none;
width: 450px;
padding-top:25px;
white-space: nowrap;
}

#content #sub_cont{
width: 450px;
display:none;
height:14px;
}

#content .no-rec{
color:#000;
font-family:Arial, Helvetica, sans-serif;
font-size:14px;
padding:5px;
border-bottom:solid #000;
text-align:left;
background:#EBEBEB;
}

#content .each_rec {
background: none repeat scroll 0 0 #EBEBEB;
border-bottom: medium solid #000000;
color: #000;
font-family: Arial,Helvetica,sans-serif;
font-size: 14px;
padding: 5px;
height:12px;
}

PHP

<?php
echo "<h2>Search Result</h2>";
echo "<table border='0' id='content' cellspacing='2' cellpadding='5'>
<tr bgcolor='#FFFFCC'>
<th>VM Name</th>
<th>vCenter Name</th>
</tr>";

while ($row = sqlsrv_fetch_array($result))

{
echo "<tr class='each_rec'>";
echo "<td>" . $row['VM_NAME'] . "</td>";
echo "<td>" . $row['VCENTER_NAME'] . "</td>";
echo "</tr>";
}
echo "</table>";

if($total==0){ echo '<div class="no-rec">No Record Found !</div>';}?>

最佳答案

在 Internet Explorer 中,我们必须使用 whiteSpace 属性来换行文本,whiteSpace 用法的文档链接如下。祝你好运,记得使用最新版本的 IE 以保持准确性。

链接:http://msdn.microsoft.com/en-us/library/ie/ms531182(v=vs.85).aspx

关于php - CSS 空白 : nowrap not working in IE,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22487528/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com