在过去一周在此站点上研究了一个又一个代码之后,我还没有找到一个可以让我的固定横幅居中的代码。我现在束手无策,拼命寻求帮助。
这是我目前所拥有的:
.heading {
position:fixed;
z-index:1;
overflow:hidden;
color:{color:background};
background-color:{color:background};
top:0px;
left:5%;
right:95%;
margin-left:-570;
font-size:11px;
width:1030px;
height:auto;
text-align:center;
border-bottom:2px solid {color:text};
}
到目前为止,这是它的样子:
http://m-orning-star.tumblr.com/
任何输入都会很棒。谢谢。
最佳答案
试试这个:
.heading {
left: 0px; /* Changed this to 0 */
right:95%; /* REMOVE this line */ <<<<<<<<<<<<<<
margin-left: 0; /* Changed this to 0 */
font-size:11px;
width: 100%; /* Changed this to 100% */
height:auto;
}
关于css - 试图将我的固定横幅放在我的博客上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21058089/