css질문 드려요.. 상위 div css 무시....;

css질문 드려요.. 상위 div css 무시....;

QA

css질문 드려요.. 상위 div css 무시....;

답변 2

본문

3546884696_1569482802.3351.png

 

css코드 질문합니다..

코드에서... width1260이라는 div css는


 position: relative;
 width: 70%;
 margin: 0 auto;

 

이구여

 

main_bn 은...


margin: 0 auto;
    padding: 0px 0 50px;
    display: block;
    text-align: start;
    float: none;
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    z-index: auto;
    width: 100% !important;

 

입니다..

 

문제는 위 div width1260값이 70% 잡혀있고

div main_bn은 100% 로 잡혀있습니다.

 

저는 main_bn값을 100%늘려 와이드하게 하고싶은데 div width1260에 잡혀서 70%를 벗어나지못하고있어요ㅠ

 

방법이 있을까요? ㅠ

이 질문에 댓글 쓰기 :

답변 2

<div>
    <div class="parent"><p></p></div>
</div>

 

<style>
body{overflow-x:hidden}
div{min-height:40px; box-sizing:border-box}
div > div.parent{height:100px; background:#000; width:800px; margin:0 auto}
div > div.parent p{width:100vw; background:#fcf; height:50px; margin-left: calc( -50vw + 50% ); border:1px solid #f00}
</style>

 

배경색과 보더는 영역 확인 하시라고 넣은 것이니 알아서 조절하시면 됩니다

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 16,797
© SIRSOFT
현재 페이지 제일 처음으로