首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >html5页面的对齐方式

html5页面的对齐方式
EN

Stack Overflow用户
提问于 2012-10-25 00:44:53
回答 1查看 777关注 0票数 0

问题是我不能找出我的对齐的问题,我试图限制标题横幅在css中居中顶部,但这是失败的,我的文本没有对齐到中心,它正在向下移动,如果以较低的分辨率查看,任何人都能找出问题的原因

代码语言:javascript
复制
html {
min-height: 20%;
max-height: 80%;
max-width: 80%;
background-size: cover;
background-image: url();
background-repeat: no-repeat;
background-position: center top;
}

body {
min-height:80%;
width: 800px;
max-width: 90%;
margin-top:550px;
font-size: 30px;

}我的代码css在上面,下面是我的站点链接http://design3web.in/test1/

EN

回答 1

Stack Overflow用户

发布于 2012-10-25 00:58:52

这取决于你想要实现什么。要使页面居中,请使用body { margin:auto; }并从html中删除max-width: 80%;

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/13053778

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档