【发布时间】:2020-07-02 11:52:26
【问题描述】:
portfolio页面的位置很好但是我认为我没有正确使用margin-left,我认为我必须使用另一个礼貌?
然后,我的第二个问题是我的languages 页面离我的portfolio 页面太远,我想修复为50 px。但我不能这样做,因为我遇到了第一个问题。
感谢您的帮助。
body{
margin: 0px;
padding: 0px;
}
header{
background-color: #B1DBE8;
height: 98px;
}
.header-block{
font-size: 11px;
text-transform: uppercase;
padding-top: 8px;
font-weight: 700;
color: #777;
line-height: 20px;
}
.page-left{
display: inline-block;
margin-left: 430px;
}
<body>
<header>
<div class="header-block">
<div class="page-left">Portfolio</div>
<div class="page-left">Languages</div>
</div>
</header>
</body>
【问题讨论】:
-
我不认为
.page-left类的工作方式与您在图片中显示的一样。
标签: css css-position margin margin-left