인프런 커뮤니티 질문&답변
border 겹침은 어떻게 해결하나요?
작성
·
4.1K
0
자세히 보시면 공지사항과 보도자료 보도자료와 해명자료 사이에 border가 겹쳐서 두껍게 표시되는데요 margin-right:-1px하면 겹처지는게 사라지는데 이방법 아니면
.tab_lis li.m1 >a , .tab_lis li.m2 >a, .tab_lis li.m3 >a 마다 border 설정을 해줘야 하는 건가요?
.tab_list li.m1 > a,
.tab_list li.m2 > a,
.tab_list li.m3 > a {
display: block;
/* float: left; */
position: absolute;
left: 0;
top: 0;
/* padding: 0 30px; */
width: 80px;
text-align: center;
border: 1px solid #aaa;
border-bottom: 1px;
background-color: #eee;
color: #666;
margin-right: -1px;
font-size: 13px;
line-height: 35px;
text-decoration: none;
}
답변 1
1
Dongho Lee
지식공유자
탭메뉴 부분에서 버튼 부분을 position:absolute 지정한 예제네요,
absolute 지정한 경우 두번째와 세번째의 버튼에서 left 값을 선이 겹치게 지정하는 방법이 있겠습니다.
두번째가 left: 80px 이라면 left: 79px 을 지정해 보는 것이지요.
absolute가 아닐 경우에는 margin-left: -1px 을 지정해서 포개지도록 하면 됩니다.





