gpt4 book ai didi

html - 我的 table 上有空白

转载 作者:行者123 更新时间:2023-11-28 15:02:52 26 4
gpt4 key购买 nike

我的 table 上有空白。我已经搜索了论坛,但似乎我的所有设置都是正确的。跟图片有关系吗?Cellpadding 在这里,但没有运气。

谁知道哪里出错了?我试过 block to 但没有运气,我知道我一定错过了一些东西但我似乎无法找到它。我无法向这篇文章添加更多详细信息。

example

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<meta name="HandheldFriendly" content="True">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">

<title>House of Talents</title>
<style type="text/css">

img {display: inline-block}

.floatRight {float:right;}
.floatLeft {float:none;}

.mobileShow {display: none}

.MPED_ULSortable {margin: 0 !important;padding: 0 !important;}

.cornerAll {border-radius: 0px;}

@media only screen and (max-device-width: 850px), (max-width: 850px) {
.logo {width: 180px;height: auto;}
.marginBottom {
margin-bottom: 15px;
}
.contentTable {
width:100% !important;
float: none !important;
}
td[class="floatLeft"] {
float:left !important;
width: 100% !important;
}
td[class="floatRight"] {
width: 100% !important;
float:right !important;
}
.mobileHide {display:none}
.mobileShow {display: block !important}

.resizeImage img {
width: 100%;
height: auto;
}
}
</style>
</head>



<table cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td class="MPED_CONTENT">
<div class="MPED_CONTENTBLOCK">
<table border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#FFFFFF">
<tbody>
<tr>
<td align="center">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="width: 850px; max-width: 850px;">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="resizeImage" style="font-family: Arial, Helvetica, sans-serif; font-size: 15px; color: #243e55; font-weight: bold; background-color: #f3716d; width: 425px; padding-left: 60px;" width="425"><br>
<br>
<img src="http://images.m9.mailplus.nl/user3900328/765/arcq_wit_4x.png" border="0" width="150" height="37" mpdatacustomsize="true"><br>
<br>
<span style="color: #e94b5a; font-family: helvetica;">&nbsp;<br>
</span></td>

<td class="resizeImage" style="font-family: Arial, Helvetica, sans-serif; font-size: 15px; color: #243e55; font-weight: bold; background-color: #f3716d; width: 425px;" width="425">&nbsp;</td>
</tr>

<tr>
<td style="font-family: Arial, Helvetica, sans-serif; font-size: 15px; color: #43565e;">
<blockquote>
<p class="p1">&nbsp;</p>
</blockquote>
</td>

<td style="font-family: Arial, Helvetica, sans-serif; font-size: 15px; color: #43565e;">
<p class="p1"><span style="font-family: helvetica;"><img src="http://images.m9.mailplus.nl/user3900328/131/welcome0.png" border="0" width="425" height="425" mpdatacustomsize="true" ><br>
</span></p>
</td>
</tr>

<tr>
<td style="font-family: Arial, Helvetica, sans-serif; font-size: 15px; color: #43565e; line-height: 18px; background-color: #e7f0f7;">&nbsp;</td>

<td style="font-family: Arial, Helvetica, sans-serif; font-size: 15px; color: #43565e; line-height: 18px; background-color: #e7f0f7;">&nbsp;</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
</tbody>
</table>
</body>
</html>

最佳答案

你的 <p>标签默认添加边距。没有 css 类 p1已定义,但将该类的边距设置为零将解决此问题。

注意

我故意解决涉及使用表格进行布局的不良做法(或此代码中的其他无数其他不良做法)。

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<meta name="HandheldFriendly" content="True">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">

<title>House of Talents</title>
<style type="text/css">

img {display: inline-block}

.floatRight {float:right;}
.floatLeft {float:none;}

.mobileShow {display: none}

.MPED_ULSortable {margin: 0 !important;padding: 0 !important;}

.cornerAll {border-radius: 0px;}

.p1 { margin: 0 };

@media only screen and (max-device-width: 850px), (max-width: 850px) {
.logo {width: 180px;height: auto;}
.marginBottom {
margin-bottom: 15px;
}
.contentTable {
width:100% !important;
float: none !important;
}
td[class="floatLeft"] {
float:left !important;
width: 100% !important;
}
td[class="floatRight"] {
width: 100% !important;
float:right !important;
}
.mobileHide {display:none}
.mobileShow {display: block !important}

.resizeImage img {
width: 100%;
height: auto;
}
}
</style>
</head>



<table cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td class="MPED_CONTENT">
<div class="MPED_CONTENTBLOCK">
<table border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#FFFFFF">
<tbody>
<tr>
<td align="center">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="width: 850px; max-width: 850px;">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="resizeImage" style="font-family: Arial, Helvetica, sans-serif; font-size: 15px; color: #243e55; font-weight: bold; background-color: #f3716d; width: 425px; padding-left: 60px;" width="425"><br>
<br>
<img src="http://images.m9.mailplus.nl/user3900328/765/arcq_wit_4x.png" border="0" width="150" height="37" mpdatacustomsize="true"><br>
<br>
<span style="color: #e94b5a; font-family: helvetica;">&nbsp;<br>
</span></td>

<td class="resizeImage" style="font-family: Arial, Helvetica, sans-serif; font-size: 15px; color: #243e55; font-weight: bold; background-color: #f3716d; width: 425px;" width="425">&nbsp;</td>
</tr>

<tr>
<td style="font-family: Arial, Helvetica, sans-serif; font-size: 15px; color: #43565e;">
<blockquote>
<p class="p1">&nbsp;</p>
</blockquote>
</td>

<td style="font-family: Arial, Helvetica, sans-serif; font-size: 15px; color: #43565e;">
<p class="p1"><span style="font-family: helvetica;"><img src="http://images.m9.mailplus.nl/user3900328/131/welcome0.png" border="0" width="425" height="425" mpdatacustomsize="true" ><br>
</span></p>
</td>
</tr>

<tr>
<td style="font-family: Arial, Helvetica, sans-serif; font-size: 15px; color: #43565e; line-height: 18px; background-color: #e7f0f7;">&nbsp;</td>

<td style="font-family: Arial, Helvetica, sans-serif; font-size: 15px; color: #43565e; line-height: 18px; background-color: #e7f0f7;">&nbsp;</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
</tbody>
</table>
</body>
</html>

关于html - 我的 table 上有空白,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49880929/

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