css메뉴바 질문이요
본문
가로정렬 메뉴바를 만들었는데 저렇게 빈칸이 생기네요 빈칸없이 붙이고싶은데..
어떻게 해야되나요? 원래 float:left; 였는데 메뉴바를 중앙에 배치하려고 ul 과li에 display:inline-block;로 바꿨더니 저래요. 메뉴바를 중앙에 배치하면서 저 빈칸없애려면 어떻게 해야되나요?
메뉴바css는 이렇습니다..
/*--게시판코드--*/
#topMenu{
height: 0px;
width: 1080px;
text-align:center;
margin:0% 10% 0% 8%;
}
#topMenu ul li{
list-style: none;
background-color: #b30000;
color:white;
display:inline-block;
line-height: 30px;
vertical-align: middle;
}
#topMenu .menulink{
text-decoration:none;
color:beige;
display: block;
width: 150px;
font-size: 15px;
font-weight: bold;
font-family:"Trebuchet MS", Dotum, Arial;
}
#topMenu .menulink:hover{
color:#e62e00;
background-color:#ffe6cc;
}
어떻게 해야되나요?
답변 6
html 코드도 올리셔야 자세한 답변 가능합니다.
일단은,
li나 menulink 부분에 margin:0 주시면 되는지 확인해 보세요.
이건 해당페이지를 알려주셔야 해결 가능한 문제입니다.
개발자도구에서 css 를 실시간 변경해보세요 ..
아래쪽부터 빼다 보면 어디가 문제인지 알겁니다.
#topMenu ul {font-size:0}
#topMenu ul li 소스상 공백 다 붙여보세요
margine: 0 !imporant;
를 사용 해 보세요.