gpt4 book ai didi

html - 标题不会居中

转载 作者:太空宇宙 更新时间:2023-11-04 02:01:26 25 4
gpt4 key购买 nike

我的标题不会居中。如您所见,副标题没问题,但标题更靠左。我怎样才能解决这个问题?网址链接:http://st358373.cmd16c.cmi.hanze.nl/portfolio.html

HTML:

<div class="titel">Portfolio</div>
<div class="subtitel">Hier is een selectie van recentelijk werk.</div>

CSS:

.titel {
font-family: Raleway;
font-size: 52px;
color: #3b3d40;
text-align: center;
font-weight: 700;
margin-top: 20px;
display: block;
}

.subtitel {
font-family: Adobe Caslon Pro;
font-size: 18px;
text-align: center;
margin-top: 40px;
margin-bottom: 50px;
}

最佳答案

您网站的问题在于您的社交图标向右浮动。因此,您需要做的就是清除标题容器。为此,您需要做的就是为您的 .titel

添加 clear: right;

作为引用,请检查 MDN documentation on the clear property

关于html - 标题不会居中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41683763/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com