如何解决页面侧面的空白?

时间:2019-03-30 16:26:16

标签: html css margin

黑色边框不会到达页面的末尾,因为盒子的末尾有2厘米的间隙。

任何代码段将不胜感激。

<style>
body {
margin: 0px;
}
</style>
<style> * { font-family: "arial" }</style>
<h3 style="background: none; margin: 0px; padding: 0px; border: 0px; border-image: none; text-align: left; text-transform: none; text-indent: 0px; letter-spacing: normal; font-size: 10px; font-style: normal; font-variant: normal; text-decoration: none; word-spacing: 0px; white-space: normal; box-sizing: content-box; orphans: 2; -webkit-text-stroke-width: 0px;">
<table class="_860eef0a b64b0d83" style="background: rgb(0,0, 0); margin: 0px 0px 1.25em; padding: 0px; border: 0.1rem solid rgb(0, 0, 0); border-image: none; width: 100%; vertical-align: baseline; border-collapse: collapse; box-sizing: content-box; border-spacing: 0px;">
<tbody style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; border-bottom-color: currentColor; border-bottom-style: none; border-bottom-width: 0px; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-left-color: currentColor; border-left-style: none; border-left-width: 0px; border-right-color: currentColor; border-right-style: none; border-right-width: 0px; border-top-color: currentColor; border-top-style: none; border-top-width: 0px; box-sizing: content-box; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
<tr class="f6b295dc" style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; border-bottom-color: currentColor; border-bottom-style: none; border-bottom-width: 0px; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-left-color: currentColor; border-left-style: none; border-left-width: 0px; border-right-color: currentColor; border-right-style: none; border-right-width: 0px; border-top-color: currentColor; border-top-style: none; border-top-width: 0px; box-sizing: content-box; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
<th class="_01f431d5 _4dd9ac8e _0a766d07 _384d5fd7" style="background: none; margin: 0px; padding: 0.8rem 0.3rem 0.8rem 0.0rem; border: medium; border-image: none; width: 50%; text-align: left; line-height: 1rem; font-size: 1.4rem; vertical-align: top; box-sizing: content-box;">
<div align="left">
<font color="#ffffff">&nbsp;</font>
</div>
</th>
</tr>
</tbody>
</table>
</h3>
<font size="4" style="font-family:arial" rwr="1">
</font><h3><font size="4" style="font-family:arial" rwr="1">
<font size="4" style="color: rgb(0, 0, 0); font-family:arial: ; font-size: 18.06px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;" rwr="1">
</font></font><div style="text-align: left; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; font-size: 18.66px; font-style: normal; font-variant: normal; word-spacing: 0px; white-space: normal; orphans: 2; -webkit-text-stroke-width: 0px;"><font size="4" style="font-family:arial" rwr="1"><font size="4" style="color: rgb(0, 0, 0); font-family:arial: ; font-size: 18.06px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;" rwr="1">
</font></font><div style="text-align: left; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; font-size: 18.66px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; word-spacing: 0px; white-space: normal; orphans: 2; -webkit-text-stroke-width: 0px;"><font style="font-family:Arial" rwr="1"><font style="font-family:Arial" rwr="1"><font style="font-family:Arial" rwr="1"><font style="font-family:Arial" rwr="1"><font style="font-family:Arial" rwr="1"><font style="font-family:Arial" rwr="1"><font style="font-family:Arial" rwr="1"><font style="font-family:Arial" rwr="1"><font style="font-family:Arial" rwr="1"><font style="font-family:Arial" rwr="1"><font style="font-family:Arial" rwr="1"><font style="font-family:Arial" rwr="1"><font style="font-family:Arial" rwr="1"><font style="font-family:Arial" rwr="1"><font style="font-family:Arial" rwr="1"><font style="font-family:Arial" rwr="1"><font style="font-family:Arial" rwr="1"><font style="font-family:Arial" rwr="1"><font color="#000000" size="4"><font size="4" style="font-family:Arial" rwr="1"</font></font></font></font></font></font></font></font>

2 个答案:

答案 0 :(得分:0)

这是因为默认情况下将用户代理样式表应用于浏览器。身体标签css的边距为:8px;

请尝试覆盖您的CSS

body {
 margin: 0px;
}

答案 1 :(得分:0)

对不起,我误解了你的问题。我认为您在框中指定了错误的边距和填充。

<h3
    style="background: none; margin: 0px; padding: 0px; border: 0px; border-image: none; text-align: left; text-transform: none; text-indent: 0px; letter-spacing: normal; font-size: 10px; font-style: normal; font-variant: normal; text-decoration: none; word-spacing: 0px; white-space: normal; box-sizing: content-box; orphans: 2; -webkit-text-stroke-width: 0px;">
    <table class="_860eef0a b64b0d83"
        style="background: rgb(0,0, 0); margin: 0px 0px 1.25em; padding: 0px; border: 0.1rem solid rgb(0, 0, 0); border-image: none; width: 100%; vertical-align: baseline; border-collapse: collapse; box-sizing: content-box; border-spacing: 0px;">
        <tbody
            style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; border-bottom-color: currentColor; border-bottom-style: none; border-bottom-width: 0px; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-left-color: currentColor; border-left-style: none; border-left-width: 0px; border-right-color: currentColor; border-right-style: none; border-right-width: 0px; border-top-color: currentColor; border-top-style: none; border-top-width: 0px; box-sizing: content-box; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
            <tr class="f6b295dc"
                style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; border-bottom-color: currentColor; border-bottom-style: none; border-bottom-width: 0px; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-left-color: currentColor; border-left-style: none; border-left-width: 0px; border-right-color: currentColor; border-right-style: none; border-right-width: 0px; border-top-color: currentColor; border-top-style: none; border-top-width: 0px; box-sizing: content-box; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
                <th class="_01f431d5 _4dd9ac8e _0a766d07 _384d5fd7"
                    style="background: none; margin: 0px; padding: 0.8rem 0.3rem 0.8rem 0.0rem; border: medium; border-image: none; width: 50%; text-align: left; line-height: 1rem; font-size: 1.4rem; vertical-align: top; box-sizing: content-box;">
                    <div align="left">
                        <font color="#ffffff">Product Description&nbsp;</font>
                    </div>
                </th>
            </tr>
        </tbody>
    </table>
</h3>

也许是这样:

margin: 0px 0px 1.25em;

如果这对您没有帮助,请通过Chrome元素检查分析边距和填充。

================================================ ==========

您应该给我们更多信息,并提供您当前的代码以提供合格的答案。因此,您可以尝试执行以下操作:

.footer {
    position: fixed;
    bottom: 0;    
    height: 60px;
    width: 100%;
}

这为您提供了一个固定的底部框。您必须根据需要调整高度和宽度。