중앙 정렬어떻게 해야하는지요.

중앙 정렬어떻게 해야하는지요.

QA

중앙 정렬어떻게 해야하는지요.

본문

수고하십니다.

아래 코드에 중앙 정렬할 수 있는 법이 있을까요?

 

https://sir.kr/g5_plugin/5184#c_10602

스킨인데

 

트위터 내용을 가지고 오고있습니다.

에디터에서 중앙 정렬을 시켜도 중앙 정렬이 안되고 있어서요.

 

사이즈 수정해줘도 변화가 없구요.

 

조언 좀 부탁드립니다.

감사합니다.

 

width:510,
height:315,

 

<script src="<?php echo G5_JS_URL ?>/auto.change.min.js" charset="utf-8"></script>
<script>
$(function() {
    $('#bo_v_con').GnuView(
        {
            width:510,
            height:315,
            youtube:true,
            instargram:true,
            kakao:true,
            twitter:true,
            vimeo:true,
            dailymotion:true
        });
});
</script>

이 질문에 댓글 쓰기 :

답변 3

대충 아래처럼 하면 되지 않을까요?


<style>
#bo_v_con iframe { display:block; margin:0 auto; }
</style>

아이프레임의 css 부분을 찾아 display:block 을 주고 margin:0 auto 를 같아 주면 됩니다.

display:block 를 주지 않고 margin:0 auto 만 주면 버티기에 들어가구요.

염치없지만 한번 봐주실 수 있으시나요...
처음보는 코드들이라 어디를 어떻게 해야 할 지를 모르겠습니다.


function youtube(t){var e=[/<a href="(https?:\/\/youtu.be\/([a-zA-Z0-9\-_]+))"[^>]*>/gi,/<a href="(https?:\/\/www.youtube.com\/watch\?v=([a-zA-Z0-9\-_]+))"[^>]*>/gi];for(var i in e){for(var a=t.$element.html();;){if(null==(o=e[i].exec(a)))break;var r=o[1];a=a.replace(o[0],"")}t.$element.html(a)}var n=[/https?:\/\/youtu.be\/([a-zA-Z0-9\-_]+)/gi,/https?:\/\/www.youtube.com\/watch\?v=([a-zA-Z0-9\-_]+)/gi],l='<iframe title="YouTube video player" width="'+t.settings.width+'" height="'+t.settings.height+'" src="//www.youtube.com/embed/#[CODE]" frameborder="0" allowfullscreen></iframe>';for(var i in n){for(a=t.$element.html();;){var o;if(null==(o=n[i].exec(a)))break;r=o[1];a=a.replace(o[0],l.replace("#[CODE]",r))}t.$element.html(a)}}function instargram(t){auto_link_del(t,/<a href="(https?:\/\/www\.)?instagram\.com(\/p\/\w+\/?)"[^>]*>/gi);for(var e=/(https?:\/\/www\.)?instagram\.com(\/p\/\w+\/?)/gi,i=(t.$element.html().match(e)||[]).length,a=t.$element.html(),r='<blockquote width="'+t.settings.width+'" height="'+t.settings.height+'" class="instagram-media" data-instgrm-captioned data-instgrm-permalink="https://www.instargram.com#[CODE]" data-instgrm-version="8"></blockquote>',n=0;n<i;n++){var l=e.exec(a);if(null==l)break;var o=l[2];a=a.replace(l[0],r.replace("#[CODE]",o)),t.$element.html(a+'<script async defer src="//www.instagram.com/embed.js"><\/script>')}}function KakaoPot(t){auto_link_del(t,/<a href="(https?:\/\/|www\.)play-tv.kakao.com\/channel\/[0-9]+\/(livelink|cliplink)\/([A-Za-z0-9]+)"[^>]*>/gi);for(var e=/(https?:\/\/|www\.)play-tv.kakao.com\/channel\/[0-9]+\/(livelink|cliplink)\/([A-Za-z0-9]+)/gi,i=(t.$element.html().match(e)||[]).length,a=t.$element.html(),r='<div class="videowrapper"><iframe width="'+t.settings.width+'" height="'+t.settings.height+'" src="https://tv.kakao.com/embed/player/#[CODE]?width=640&height=360&service=kakao_tv" frameborder="0" scrolling="no" ></iframe></div>',n=0;n<i;n++){var l=e.exec(a);if(null==l)break;var o=l[2]+"/"+l[3];a=a.replace(l[0],r.replace("#[CODE]",o)),t.$element.html(a)}}function Twitter(t){auto_link_del(t,/<a href="http(s)?:\/\/(.*\.)?twitter\.com\/(\w+)\/?status\/(\w+)"[^>]*>/gi);for(var e=/http(s)?:\/\/(.*\.)?twitter\.com\/(\w+)\/?status\/(\w+)/gi,i=(t.$element.html().match(e)||[]).length,a=t.$element.html(),r=0;r<i;r++){var n=e.exec(a),l=n[3]+"/status/"+n[4];a=a.replace(n[0],"<blockquote class='twitter-tweet' data-lang='ko'> <a href='//twitter.com/#[CODE]' style='text-decoration:none;'><span style='font-size:15px;text-decoration:none;'></blockquote>".replace("#[CODE]",l))}t.$element.html(a+"<script async src='//platform.twitter.com/widgets.js' charset='utf-8'><\/script>")}function Vimeo(t){auto_link_del(t,/<a href="(https?:\/\/|www\.)vimeo.com\/([A-Za-z0-9]+)"[^>]*>/gi);for(var e=/(https?:\/\/|www\.)vimeo.com\/([A-Za-z0-9]+)/gi,i=(t.$element.html().match(e)||[]).length,a=t.$element.html(),r='<iframe src="https://player.vimeo.com/video/#[CODE]" width="'+t.settings.width+'" height="'+t.settings.height+'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>',n=0;n<i;n++){var l=e.exec(a),o=l[2];a=a.replace(l[0],r.replace("#[CODE]",o))}t.$element.html(a+"<script async src='//platform.twitter.com/widgets.js' charset='utf-8'><\/script>")}function Dailymotion(t){auto_link_del(t,/<a href="(https?:\/\/www\.)dailymotion.com\/video\/([A-Za-z0-9]+)"[^>]*>/gi);for(var e=/(https?:\/\/www\.)dailymotion.com\/video\/([A-Za-z0-9]+)/gi,i=(t.$element.html().match(e)||[]).length,a=t.$element.html(),r='<iframe frameborder="0" width="'+t.settings.width+'" height="'+t.settings.height+'" src="//www.dailymotion.com/embed/video/#[CODE]" allowfullscreen="" allow="autoplay"></iframe>',n=0;n<i;n++){var l=e.exec(a),o=l[2];a=a.replace(l[0],r.replace("#[CODE]",o))}t.$element.html(a+"<script async src='//platform.twitter.com/widgets.js' charset='utf-8'><\/script>")}function auto_link_del(t,e){for(var i=t.$element.html(),a=(i.match(e)||[]).length,r=0;r<a;r++){var n=e.exec(i);i=i.replace(n[0],"")}t.$element.html(i)}!function(i){var e="GnuView",a={width:510,height:315,youtube:!0,instargram:!0,kakao:!0,twitter:!0,vimeo:!0,dailymotion:!0};function r(t,e){this.element=t,this.$element=i(t),this.settings=i.extend({},a,e),this.init()}i.extend(r.prototype,{init:function(){this.settings.youtube&&youtube(this),this.settings.instargram&&instargram(this),this.settings.kakao&&KakaoPot(this),this.settings.twitter&&Twitter(this),this.settings.vimeo&&Vimeo(this),this.settings.dailymotion&&Dailymotion(this)}}),i[e]=i.fn[e]=function(t){return this.each(function(){i.data(this,"plugin_"+e)||i.data(this,"plugin_"+e,new r(this,t))})},i.fn[e].defaults=a}(jQuery,window,document),$(function(){$("#bo_v_con").GnuView({width:510,height:315,youtube:!0,instargram:!0,kakao:!0,twitter:!0,vimeo:!0,dailymotion:!0})});

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

회원로그인

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