헤더 푸터 등 전문 용어 사용을 지양
제목을 사라지게 할때 display: none
을 쓰면 화면 낭독기가 읽지 못함으로 css로 화면밖으로 보내는 방식 사용
<h2 class="hide">대메뉴</h2>
<div>콘텐츠</div>
## .hide {
position: absolute;
left: -5000px;
}
<header>
<h1><a id="logo" href="#a">서비스이름</a></h1>
</header>
#logo {
display: block;
width: 110px;
height: 48px;
color: transparent; /* 글씨는 투명으로 해서 안보이게 */
background: url('../images/logo.png') no-repeat -300px 0;
}
position: absolute
로 양 끝에 붙힌다.header {
position: relative;
text-align: center;
}
header .left {
position: absolute;
left: 50px;
top: 0;
}
header .right {
position: absolute;
right: 50px;
top: 0;
}
.item {
position: absolute;
top: 50%;
transform: translateY(-50%); /* 자기 높이의 절반 */
/* 또는 margin-top: -3.5px */
width: 1px;
height: 7px;
}
IE는 제공x
span{
display: block;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}