반응형 매뉴 정렬

반응형 매뉴 정렬

QA

반응형 매뉴 정렬

본문

http://smiletrip.tk/

 

평상시에는 로그인 회원가입쪽 메뉴(clearfix2)가 오른쪽으로 정렬되있고

1100px이하로 줄어들면 왼쪽정렬이되도록 코드를 짜고 있습니다.

평상시에도 왼쪽 정렬이 되는대 무엇을 잘못한걸까요?

 

 

 


/* clearfix */
.clearfix:before, .clearfix:after{
    content:"";, display: table;
}
.clearfix:after{
    clear:both;
}
.clearfix{
    *zoom:1;
}

nav{
    height: 40px;
    width: 100%;
    background: #455868;
    font-size: 11pt;
    font-family: 'PT Sans', Arial, Sans-serif;
    font-weight: bold;
    position: relative;
    border-bottom: 2px solid #283744;
}
nav ul .clearfix{
    padding: 0;
    position: relative;
    float:left;
    width: 940px;
    height: 40px;
}
nav li{
    display: inline;
    float: left;
}
nav ul .clearfix2{
    width: auto;
    position:relative;
    float: right;
}
nav a{
    color: #fff;
    display: inline-block;
    width: auto;
    padding: 0 10px 0 10px;
    text-align: center;
    text-decoration: none;
    line-height: 40px;
    text-shadow: 1px 1px 0px #283744;
}
nav li a{
    border-right: 1px solid #576979;
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
}
nav li:last-child a{
    border-right: 0;
    }
nav a:hover, nav a:active{
    background-color: #8c99a4;
}
nav a#pull{
    display: none;
}
/*Styles for screen 600px and lower*/
@media only screen and (max-width : 1100px) {
    nav {
        border-bottom: 0;
        height: auto;
    }
    nav ul {
        display: none;
        height: auto;
    }
    
    nav ul .clearfix2
    {
        float: left;
        
    }
    
    nav a {
          text-align: left;
          width: 100%;
          text-indent: 25px;
      }
    nav a#pull {
        display: block;
        background-color: #283744;
        width: 100%;
        position: relative;
    }
    nav a#pull:after {
        content:"";
        background: url('nav-icon.png') no-repeat;
        width: 30px;
        height: 30px;
        display: inline-block;
        position: absolute;
        right: 15px;
        top: 10px;
    }
    nav li {
        display: block;
        float: none;
        width: 100%;
    }
    nav li a {
        border-bottom: 1px solid #576979;
    }
}

이 질문에 댓글 쓰기 :

답변을 작성하시기 전에 로그인 해주세요.
전체 123,635 | RSS
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT