margin-left 正在重复/成倍增加

问题描述 投票:0回答:1

我真的不明白为什么,不知何故

margin-left
只是影响其他元素,这很烦人。

.setting-container {
  position: relative;
  top: 60px;
  left: 0px;
  width: 100%;
  height: calc(100% - 60px);
}
.setting-topnav {
  width: 100%;
  height: 40px;
  left: 0px;
  background-color: #081723;
}

.setting-topnav a {
  font-size: 12px;
  font-family: NanumGothic;
  color: #fafafa;

  vertical-align: middle;
  line-height: 40px;
  margin-left: 43px;
  text-decoration: none;
}

.setting-title {
  width: 100%;
  height: 40px;
  left: 0px;
}

.setting-title a {
  font-size: 28px;
  font-family: NanumGothic;
  color: #fafafa;

  vertical-align: middle;
  line-height: 40px;
  margin-left: 43px;
  text-decoration: none;
}
<div id="navbar_template"></div> 
<div class="setting-container">
    <div class="setting-topnav">
        <a>Setting / Basic Configuration<a>
    </div>

    <div class="setting-title">
        <a>Basic Configuration<a>
    </div>
</div> 

screenshot

html css margin
1个回答
0
投票

关闭您的标签:

<div id="navbar_template"></div> 
<div class="setting-container">
    <div class="setting-topnav">
        <a>Setting / Basic Configuration</a>
    </div>

    <div class="setting-title">
        <a>Basic Configuration</a>
    </div>
</div> 
© www.soinside.com 2019 - 2024. All rights reserved.