테스트 사이트 - 개발 중인 베타 버전입니다

반응형 매뉴 정렬 채택완료

길가던분 7년 전 조회 2,258

http://smiletrip.tk/

 

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

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

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

 

 

 

</p>

<p>/* clearfix */

.clearfix:before, .clearfix:after{

    content:"";, display: table;

}

.clearfix:after{

    clear:both;

}

.clearfix{

    *zoom:1;

}</p>

<p>

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;

}</p>

<p>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{</p>

<p>    display: none;

}</p>

<p>/*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;

        

    }</p>

<p>    

    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;

    }

}

댓글을 작성하려면 로그인이 필요합니다.

답변 2개

채택된 답변
+20 포인트
d
7년 전

nav ul.clearfix2{

 

ul과 쩜을 붙이세요

로그인 후 평가할 수 있습니다

답변에 대한 댓글 2개

길가던분
7년 전
나오긴 하는대 깨져서 나옵니다.
길가던분
7년 전
위에 답변에 사진을 올렸는대 1100xp 이하에서 깨져서 나오는대 이건 왜그런걸까요?

댓글을 작성하려면 로그인이 필요합니다.

깨져서나옴

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인