gpt4 book ai didi

html - 表格只能在 Chrome 中正常工作

转载 作者:行者123 更新时间:2023-11-28 03:30:07 24 4
gpt4 key购买 nike

有人能解释一下为什么我的经典 PHP 表格只在 Chrome 中显示正确,但在 Firefox 或 IE 中表格的内容超出了 <div> 吗? ? style.css 中的所有内容在 Chrome 中显示时在表格上正确效果,但在 Firefox 或 IE 中不 react 。我的 table :

<?php
include('db.php');
$sqlget="SELECT * FROM table ORDER BY timestamp_oglas DESC";
$sqldata= mysql_query($sqlget);
echo"<table>";
while ($row=mysql_fetch_array($sqldata)) {
echo "<tr><td>";
echo"<b><font color='#e73535'>".$row['heading']."</font></b>";
echo "<br/>";
echo $row['text'];
echo "<br/>";
echo "<img src=\"download.php?id=".$row['id']."\"><br />\n";
echo "<div style='text-align:right'><font size='1px'>".$row['timestamp']." </font></div>";
echo '<br />';
echo "</td></tr>";
}
echo"</table>";?>

我的 .css :

table{width:95%;margin-left:auto; margin-right:auto;margin-top:25px;}

屏幕截图(Chrome):

http://img708.imageshack.us/img708/9603/r40m.png

屏幕截图(Firefox):

最佳答案

我找到了解决方案。我在 style.css 中添加了这一行 table-layout: fixed;。现在完美适用于所有浏览器。

关于html - 表格只能在 Chrome 中正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18429133/

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