标题超出行数
我有一个链接,它位于我的标题下方。我尝试过 float:top (我什至认为那不是真的)
.header {
background-color: grey;
border-radius: 2px;
padding: 1%;
margin: 0%
}
#links {
font-size: xx-large;
text-align: right;
color: white;
}
<div class="header">
<header>
<h1>Jackson Pope</h1>
<div id="links">
<a href="about.html">About Me</a>
</div>
</header>
</div>
I have a link, and it is below my header. I have tried float:top (I don't even think that is real)
.header {
background-color: grey;
border-radius: 2px;
padding: 1%;
margin: 0%
}
#links {
font-size: xx-large;
text-align: right;
color: white;
}
<div class="header">
<header>
<h1>Jackson Pope</h1>
<div id="links">
<a href="about.html">About Me</a>
</div>
</header>
</div>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您想让链接仍然固定在顶部,请使用
position:fixed;
If you want to have the link still pinned at the top, then use
position: fixed;