我遇到了与我的内容不居中有关的问题....我已经阅读了所有内容并完成了我的逻辑告诉我的所有事情,但我没有看到任何变化或结果...-还应该注意这个问题开始当我开始使用每一页顶部的
编辑我想我想做的是在我网站上每个页面的顶部创建一个大约 115px 的空间,所以我可以使用 SSI 插入包含我的菜单、徽标和一些社交链接的标题,也许我要去关于这个错误?
这是我的CSS:
body{
font-family: sans-serif, times, serif;
margin:0px;
padding:0px;
padding-top:10px;
width:100%;
}
#centered{
width:900px;
height:auto;
margin:0px auto;
}
#menu{
position:relative;
top:0px;
left:0px;
}
.content{
background:none;
position:absolute;
margin:0px auto;
height:auto;
top:115px;
left:0px;
}
#feature img{
position:relative;
left:0px;
top:0px;
margin:0px;
padding:0px;
border:0px solid white;
border-radius:2px;
}
div.centercolumn{
position:relative;
left:8px;
top:0px;
width:100%;
margin:8px;
}
p.mission,.impact{
position:relative;
left:0px;
margin-top:0px;
margin-bottom:8px;
text-decoration:underline;
font-weight:bold;
text-align:center;
font-style:italic;
font-size:1.2em;
max-width:900px;
clear:both;
}
p.mission{
padding-top:10px;
}
#programs{
position:relative;
left:2px;
top:0px;
float:left;
padding-bottom:50px;
}
.spread{
padding:5px;
margin:0px 12px
}
span{
opacity:0;
-webkit-transition: opacity .5s;
-moz-transition: opacity .5s;
-o-transition: opacity .5s;
}
然后我的html:
<body>
<div id="centered">
<div id="menu">
<!--#include virtual="/menus/menu.html" -->
</div>
<div class="content">
<div id="feature">
<img id="imagefeature" src="http://www.unifiedforuganda.com/resources/test%20homepage.jpg" alt="fall 2013 tour" />
</div>
<div class="centercolumn" id="programs">
<p class="impact">Our Impact</p>
<a href="#" class="imglink spread" id="mentorship" alt="Mentorship Program"><span></span></a>
<a href="#" class="imglink spread" id="sponsorship" alt="Sponsorship Program"><span></span></a>
<a href="#" class="imglink spread" id="scholarship" alt="Scholarship Program"><span></span></a>
<p class="mission">Our Mission</p>
<p class="promotiontext">We emotionally and financially support the most destitute children of northern Uganda through scholarship and mentorship.<br>U4U is student led organization that is registered as an official 501(c)3.</p>
</div>
</div>