【发布时间】:2017-04-08 01:35:52
【问题描述】:
我试图使我的网页布局更好,所以我想在我的 html 页面的中心放置两个 div。我无权访问我的 css 文件。是否可以在没有 css 的 html 代码中将两个 div 居中在一个页面上?
这是我的代码:
<div style="width: 100%;">
<div style="; width: 100%;">
<h1 style="text-align: center;">This is Web Page Main tit</h1>
<div style="position: relative;
float: left;
left: 0px;
width: 470px;
height: 470px;
margin: 0 auto;
background-color: #828282">
<div><strong>Main Menu</strong></div>
</div>
<div style="position: relative;
float: left;
margin: 0 auto;
left: 0px;
width: 470px;
height: 470px;
background-color: #828282">
<p>oke and Managerial Tutorials</p>
</div>
</div>
<div style="background-color: #b5dcb3; clear: both;">Here text</div>
</div>
【问题讨论】:
-
为什么你不能访问你的 CSS?这听起来太离奇了,除了愚蠢的任务或类似的任务之外什么都不是......