小编Ned*_*ius的帖子

text-align:center not working

我试过寻找答案但没有任何效果.我试图对齐一个段落.我很确定没有什么能覆盖CSS中的代码.这是HTML和CSS:

body {
  background-image: url("../../images/pic01.jpg");
  background-repeat;
}
#main {
  background-color: rgb(255, 84, 0);
  width: 75%;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: auto;
  margin-top: auto;
  overflow: auto;
  height: 100%;
  color: rgb(255, 255, 255);
}
#center {
  text-align: center;
}
Run Code Online (Sandbox Code Playgroud)
<body id="top">
  <div id="main">
    <p id="center">
      <h1> TEST </h1> 
    </p>
  </div>
</body>
Run Code Online (Sandbox Code Playgroud)

这里有什么错误?

html css text-align

5
推荐指数
2
解决办法
1万
查看次数

标签 统计

css ×1

html ×1

text-align ×1