팝업 레이어가 모바일에서 제대로 안나오네요.

팝업 레이어가 모바일에서 제대로 안나오네요.

QA

팝업 레이어가 모바일에서 제대로 안나오네요.

본문

첫페이지를 개별 페이지로 만들었습니다. 팝업 레이어등록 하고 작동은 잘 되는데요 

 

pc 에서는 잘 나오는데 모바일로 볼때 아래 이미지 처럼 팝업이미지와 하단바 사이에 공간이 떠버리네요.

 

아무리 해봐도 안되서 질문드려봅니다.

 

 

31873372_1662789016.0892.jpg

 

아래 css 코드입니다. 모바일에서 자동으로 줄어들게 했습니다.

 

뭐를 좀 수정해야 할까요?

 

/* 팝업레이어 */
#hd_pop {z-index:1000;position:relative;margin:0 auto;width:100%;height:0px}
#hd_pop h2 {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden}
.hd_pops {position:absolute;border:1px solid #e9e9e9;background:#fff;cursor:move;}
.hd_pops_con {}
.hd_pops img{max-width:100%;height:auto}
.hd_pops_footer {padding:10px 0;background:#33353E;color:#A39B97;text-align:right}
.hd_pops_footer button {margin-right:5px;padding:5px 10px;border:0;background:#33353E;color:#A39B97}
.hd_pops_footer button:hover {color:#eee}

 

@media (max-width: 576px) {
#hd_pop { background: #fff; }
.hd_pops { left: 10px !important; right: 10px !important;  background: #fff; }
.hd_pops_con { width: 100% !important; height: 100% !important; background: #fff; }
.hd_pops_con img { width: 100% !important; height: auto !important; }
.hd_pops_footer {padding:10px 0;background:#33353E;color:#A39B97;text-align:right}
.hd_pops_footer button {margin-right:5px;padding:5px 10px;border:0;background:#33353E;color:#A39B97}
.hd_pops_footer button:hover {color:#eee}

 

이 질문에 댓글 쓰기 :

답변 4

이미지 사이즈를 모바일에서 고정 값을 지정하는것은 어떤가요?

.hd_pops_con img { width: 100% !important; height: auto !important; }

height :auto 는 반응형일경우 사용하고 지금처럼 @media (max-width: 576px) 일경우에는 사이즈를 고정값을 주셔도 될거 같습니다.

ㅎㅎㅎ css를 잘 모르지만 도움이 될까하여 몇자 적어 봤습니다. 


<style>
/* 팝업레이어 */
#hd_pop {z-index:1000;position:relative;margin:0 auto;width:100%;height:0px}
#hd_pop h2 {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden}
.hd_pops {position:absolute;border:1px solid #e9e9e9;background:#fff;cursor:move;}
.hd_pops_con {}
.hd_pops img{max-width:100%;height:auto}
.hd_pops_footer {padding:10px 0;background:#33353E;color:#A39B97;text-align:right}
.hd_pops_footer button {margin-right:5px;padding:5px 10px;border:0;background:#33353E;color:#A39B97}
.hd_pops_footer button:hover {color:#eee}
 
@media (max-width: 576px) {
#hd_pop { background: #fff; }
.hd_pops { left: 10px !important; right: 10px !important;  background: #fff; }
.hd_pops_con { width: 100% !important; height: 100% !important; background: #fff; }
.hd_pops_con img { width: 100% !important; height: auto !important; }
.hd_pops_footer {padding:10px 0;background:#33353E;color:#A39B97;text-align:right}
.hd_pops_footer button {margin-right:5px;padding:5px 10px;border:0;background:#33353E;color:#A39B97}
.hd_pops_footer button:hover {color:#eee}
} 
</style>
<div id="hd_pop" class="hd_pops">
    <h2>popup</h2>
</div>

 

올리신 코드로만 대충 재구성 해봤는데 테스트를 할수가 없네요

확인을 더해보니 관리자 페이지에서 네이버 에디터로 사진을 올리게 되었있는데 올리니 쓸데없이 아래 코드들이 뒤에 붙어서 그런거 같네요.

<div><p style="text-align:center;"><img src="../이미지.jpg"></p><br style="clear:both;"> </div><p><br></p>

근데 피씨는 위 코드들이 있어도 아무이상없는데 모바일만 그러네요 ㅠㅠ

싹지우고 <img src="../이미지.jpg"> 만 코드로 넣으니 아무 이상없이는 나옵니다.

네이버 에디터로 올릴때 저 코드들이 안나오게 할수도 있는지요?

<img src="../이미지.jpg"> 이렇게 깔끔하게요~

제로보드를 쓰다가 넘어와서 해보려니 막히는게 점점 많아집니다 ;;

답변을 작성하시기 전에 로그인 해주세요.
전체 0 | RSS
QA 내용 검색
  • 개별 목록 구성 제목 답변작성자조회작성일
  • 질문이 없습니다.

회원로그인

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