html - 页眉越过页脚

标签 html css

我的网站需要帮助 enter image description here

我的第 3 个页眉超出了页脚。

我的代码如下:

    <div style="width: 100%; display: table;">
    <div style="display: table-row">
    <!-- ------------------------------------------------------------------ -->
	<!-- Manufacturing Division -->
    <div style="width: 770px; height:450px; display: table-cell; background-color:#17202A ;">
	<p style="text-align:center; font-size: 30px; color:white">Manufacturing Division</p>
	<center>
	<img src="board.jpg" align="middle" style="width:250px; height:150px; text-align:center">
	</center>
	<p style="font-size=10px; text-align:center; color:white">
	With more than 20 years of expertise in Electronics Manufacturing, <br>
	we are happy to be your partner for your electronics manufacturing <br>
	solutions and PCB assembly
	</p>
    </div>
  
    <!-- Plantation Division -->
    <div style="width: 770px; height:270px; display: table-cell; background-color:#2ECC71;">
	<p style="text-align:center; font-size: 30px">Plantation Division</p>
	<center>
	<img src="plant.jpg" align="middle" style="width:250px; height:150px; text-align:center">
	</center>
	<p style="font-size=10px; text-align:center">
	The division with land bank totalling of 4, 300 acres located at Sabah state in Malaysia
	</p>
    </div>
    <!-- ------------------------------------------------------------------- -->

    </div>
    <h5 style="font-size:50px">end</h5>
    </div>


    </body>

    <footer style="background-color:lightgrey; font-size: 20px; 
    text-align:center; font-family: 'myFirstFont', italic;
	color: black;">
	Copyright &copy; 2020 All Rights Reserved, SCOPE Industries Berhad
    </footer>

“结尾”应该在页脚之上。 如果我以 100% 放大网页,它位于页脚下方。 如果我放大 80%,它位于页脚之上。

代码的第一部分是中间的2部分。 我需要向此页面添加另一部分,但不能。我的第一页也有同样的问题

最佳答案

当我在该页面上添加 header 时检查下面的代码,它显示正确!!

<header style="width: 100%;background-color:green ;">
  Text
</header>
<div style="width: 100%; display: table;">
    <div style="display: table-row">
    <!-- ------------------------------------------------------------------ -->
	<!-- Manufacturing Division -->
    <div style="width: 770px; height:450px; display: table-cell; background-color:#17202A ;">
	<p style="text-align:center; font-size: 30px; color:white">Manufacturing Division</p>
	<center>
	<img src="board.jpg" align="middle" style="width:250px; height:150px; text-align:center">
	</center>
	<p style="font-size=10px; text-align:center; color:white">
	With more than 20 years of expertise in Electronics Manufacturing, <br>
	we are happy to be your partner for your electronics manufacturing <br>
	solutions and PCB assembly
	</p>
    </div>
  
    <!-- Plantation Division -->
    <div style="width: 770px; height:270px; display: table-cell; background-color:#2ECC71;">
	<p style="text-align:center; font-size: 30px">Plantation Division</p>
	<center>
	<img src="plant.jpg" align="middle" style="width:250px; height:150px; text-align:center">
	</center>
	<p style="font-size=10px; text-align:center">
	The division with land bank totalling of 4, 300 acres located at Sabah state in Malaysia
	</p>
    </div>
    <!-- ------------------------------------------------------------------- -->

    </div>
    <h5 style="font-size:50px">end</h5>
    </div>


    </body>

    <footer style="background-color:lightgrey; font-size: 20px; 
    text-align:center; font-family: 'myFirstFont', italic;
	color: black;">
	Copyright &copy; 2020 All Rights Reserved, SCOPE Industries Berhad
    </footer>

关于html - 页眉越过页脚,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59641662/

相关文章:

jquery - IE6模态窗口问题

php - 为什么 "$_GET"密码错误?

php - 在 Blade 代码中插入 Blade 代码

css - 我如何更改 css 以适用于两种浏览器

jquery - 使用 id 选择器的媒体查询

javascript - 将复选框中的多个选择存储在 HTML 变量中并显示它们

html - 在页脚中下拉菜单

javascript - 有什么方法可以从浏览器运行服务器或点对点?

javascript - 如何使用 JavaScript 动态删除 Zend Form API 生成的 HTML 表单元素?

html - css 显示 flex 和新行