애니빌드.LAB
토론방
게시판 앨범형 게시판 모바일로 출력시 가운데 정렬, 황금망치
- e**ompy0121
- 2016-09-02 14:18:23
- hit4014
- http://lab.anybuild.co.kr/bbs/qna/6229

안녕하세요.
홈페이지 내의 갤러리 게시판 (홈페이지 모든 앨범형 게시판)이
모바일로 봤을때 가운데정렬이 안된채로 짤려서 나옵니다~
전체화면 꽉차게 가운데 정렬되게끔 부탁드리겠습니다~
(* 홈페이지 인사말과 온라인견적 웹페이지를
제외한 나머지가 갤러리게시판 입니다. 감사합니다! )
게시글 공유
URL복사
댓글작성
열기 닫기
열기 닫기
수정완료 되었습니다.
사용자 스킨으로 된 게시판의 경우 다음과 같이 수정하시면 됩니다.
<script type="text/javascript">
jQuery(function($){
var
heights = new Array()
,li = $('#lst-photo>li')
;
li.each(function(n){
heights.push($(this).height());
});
var maxHeight = Math.max.apply(0,heights);
li.height(maxHeight);
});
</script>
->
<load target="/img_up/_addon/_plugin/modernizr/modernizr.custom.media.query.js">
<script type="text/javascript">
jQuery(function($){
var
heights = new Array()
,li = $('#lst-photo>li')
;
function autoPhotoSize(){
if(Modernizr.mq('only all and (max-width:{$BBS[thum_width]+40}px)')==true){
li.each(function(n){
$(this).css('width','auto');
$(this).css('height','auto');
$(this).find('.img').css('height','auto');
});
}else{
li.each(function(n){
$(this).css('width',{$BBS[thum_width]});
$(this).find('.img').css('height',{$BBS[thum_height]});
heights.push($(this).height());
});
var maxHeight = Math.max.apply(0,heights);
li.height(maxHeight);
}
}
autoPhotoSize();
$(window).resize(function(){
autoPhotoSize();
})
});
</script>