gpt4 book ai didi

css - 文本显示在 div 之外

转载 作者:太空宇宙 更新时间:2023-11-04 15:23:00 24 4
gpt4 key购买 nike

我正在尝试将一些内容放在一个 div 中。由于某种原因,它显示在 div 下方而不是 div 内部的内容。

.scrollme
{
height: 200px;
width: 300px;
overflow: auto;
border: 1px solid #666;
background-color: #ccc;
padding: 8px;
}

echo '<table width="100%">
<tr>
<td colspan="2" class="pulldown_top_table">'.$lang['logboek'].' <a href="#?w=700" rel="popup_add_log" class="poplight" title="'.$lang['form_add'].'"><img align="center" src="images/icon/new_sm.png" onClick=\'document.getElementById("ifr_7").src="dossier_add_log.php?id='.$q.'";\' /></a></td>
</tr>
<div class="scrollme">';

while($row = mysql_fetch_array($res))
{
// maak style
if($row['soort'] == 'systeem' || $row['soort'] == 'folder')
{
$style = 'style="line-height: 10px; color: grey;"';
}
else
{
$style = 'style="line-height: 10px; color: black;"';
}

echo '<tr '.$style.' title="'.$row['naam'].' '.$row['updated_title'].'">
<td valign="top"width="35"><font size="1">'.$row['updated'].'</font></td>
<td><font size="1">'.nl2br($row['omschrijving']).'</font></td>';
echo '</tr>';
}
echo '</div>
</table>';

enter image description here

生成的部分html以:

开头
<table width="100%">

<tr>

<td colspan="2" class="pulldown_top_table"> <a href="#?w=700" rel="popup_add_log" class="poplight" title=""><img align="center" src="images/icon/new_sm.png" onClick='document.getElementById("ifr_7").src="dossier_add_log.php?id=256";' /></a></td>

</tr>

<div class="scrollme"><tr style="line-height: 10px; color: grey;" title="Mark Ruiter 30-06-2011 13:11">

<td valign="top"width="35"><font size="1">30-06</font></td>

<td><font size="1">Producten van product gekopieerd naar map subfolder 2</font></td></tr><tr style="line-height: 10px; color: grey;" title="Mark Ruiter 30-06-2011 12:41">

并以:

结尾
<td><font size="1">Dossier aangemaakt met:<br /> 
Klantreferente: 2119<br />
Bewerkingen: nvt<br />
Materiaal: S235<br />
Dikte: 1<br />
Attest: geen</font></td></tr></div>

</table>

请帮忙。

最佳答案

您不能在表格中插入这样的 DIV:

一个表有 tr (rows) 和 td(columns) 所以如果你想插入一个 DIV 你必须把它放在元素里面

<table><tr><td><div /></td></tr></table>

将整个表格放在 DIV 中:

<div><table>...</table></div>

关于css - 文本显示在 div 之外,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6533992/

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