2013-10-31 2 views
2

내가 로그인 페이스 북 버튼을 표시하려면이 코드를페이스 북 로그인 버튼 스타일

<span style="float:right; height:40px; line-height:45px;vertical-align:top; 
font-size:14px; padding-right:10px; "><?php if($this->tank_auth->is_logged_in()) 
{ echo "Welcome " .anchor('profile',$this->tank_auth->get_username())." | ".anchor 
    ('profile/find_friends','Find Friends')." | ".anchor('auth/logout','Logout');} 
    else {?><?php echo anchor('auth/login','Login'); ?> | 
    <fb:login-button v="2" perms="" length="long" 
    onlogin='window.location="https://graph.facebook.com/oauth/authorize?client_id=<?php echo 
$this->config->item('facebook_app_id'); ?>&redirect_uri=<?php echo site_ur 
('auth_other/fb_signin'); ?>&amp;r="+window.location.href;'></fb:login-button><?php } ?></span> 
      <div style="clear:both"></div> 
내가 페이지를 탐색 할 때이 코드는이로 변환

: 나는 수직 정렬을 제거 할

<fb:login-button v="2" perms="" length="long" 
    onlogin="window.location=&quot;https://graph.facebook.com/oauth/authorize? 
    client_id=372198139465874&amp; 
    redirect_uri=http://allviralvideo.org/auth_other/fb_signin&amp;r=&quot;+window.location.href;" 
    login_text="" class=" fb_iframe_widget" fb-xfbml-state="rendered" fb-iframe-plugin- 
    query="app_id=372198139465874&amp;locale=en_US&amp;sdk=joey"> 
    **<span style="vertical-align: bottom; width: 69px; height: 22px; ">**<iframe 
    name="f1d6c3fee8" width="1000px" height="1000px" frameborder="0" allowtransparency="true" 
    scrolling="no" title="fb:login_button Facebook Social Plugin" style="border-top-style: none; 
    border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: 
    initial; border-color: initial; width: 69px; height: 22px; visibility: visible; " 
    src="http://www.facebook.com/plugins/login_button.php?app_id=372198139465874&amp;channel=http%3A%2F%2Fstatic.ak.facebook.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D28%23cb%3Df11db3306c%26domain%3Dallviralvideo.org%26origin%3Dhttp%253A%252F%252Fallviralvideo.org%252Ff72d2ade4%26relation%3Dparent.parent&amp;locale=en_US&amp;sdk=joey" class=""></iframe></span></fb:login-button> 

를 : 바닥; 굵게 표시된 부분. 수직 정렬 추가 : 상단; 태그를 부모 태그에 추가하지만 태그는 숨 깁니다. 이것을 제거 할 방법이 있습니까?

+1

자바 스크립트를 사용할 때 removeClass() 메소드가 도움이 될 것이라고 생각합니다. 그러나 나는 그다지 JS가 아니다. 죄송합니다 ... = ( –

+0

내가 아무것도하지만이를 사용하여 변경 : <스크립트 유형 = "텍스트/자바 스크립트"> $ (함수() { $ ('FB : 버튼 로그인 : 스팬') removeAttr ('스타일'); .}); –

+0

내가 수직 정렬을 추가! 최고 중요한, FB에 : login- 버튼을 클릭하십시오. –

답변

1

Facebook 버튼의 바로 위 부모를 사용하여 CSS의 범위를 타겟팅 할 수 있습니다. 같은 뭔가!

.parent span { 
    vertical-align: top !important; 
} 

가 인라인 스타일을 생성 이후로, 당신은 중요한을 사용해야합니다 그렇지 않으면이 무시됩니다.

CSS에서 fb 요소를 직접 타겟팅 할 수도 있지만 확실하지는 않습니다.