중앙 정렬어떻게 해야하는지요. 채택완료
수고하십니다.
아래 코드에 중앙 정렬할 수 있는 법이 있을까요?
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개
대충 아래처럼 하면 되지 않을까요?
</p>
<p><style></p>
<p>#bo_v_con iframe { display:block; margin:0 auto; }</p>
<p></style></p>
<p>
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
아이프레임의 css 부분을 찾아 display:block 을 주고 margin:0 auto 를 같아 주면 됩니다.
display:block 를 주지 않고 margin:0 auto 만 주면 버티기에 들어가구요.
답변에 대한 댓글 1개
처음보는 코드들이라 어디를 어떻게 해야 할 지를 모르겠습니다.
[code]
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})});
[/code]
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
변화는 없네요 ^^;;