1
Desenvolvimento / Re: Código estranho na Header - Ajuda!
« em: 19/Ago/2014 19:38 »
A mim também me surge isso.
Já verificaste se não tens nada mal fechado?
Já verificaste se não tens nada mal fechado?
/* Share */
.share-post {
clear: both;
margin:10px -20px -20px;
padding: 10px 0px 10px 10px ;
background:#F7F7F7;
border-top:1px solid #EAEAEA;
height:20px;
}
.mini-share-post {
clear: both;
margin:10px -20px -20px;
padding:10px 10px 10px 25px;
height:20px;
}
.share-post li , .mini-share-post li{
float: left;
width: 106px;
}
.share-post span.share-text{
background:#FF8500 ;
margin: -10px 10px -10px -10px ;
display:block;
float:left;
color: #FFF;
padding:9px;
font-family: BebasNeueRegular,arial,Georgia, serif;
font-size: 14pt;
}
Não quero que leves a mal o que vou escrever, mas, se queres ajuda, seria mais que justo forneceres o que é preciso para quem ajuda poder trabalhar no teu problema. Ficar a adivinhar não te ajuda a ti, nem quem te tenta ajudar.
Quando precisas de um mecânico, deixas o carro em casa e vais levando peças do motor para ele descobrir onde está a avaria? Acho que não. Aqui passa-se a mesma coisa que na analogia, só não tens de pagar a factura à saída.
Uma coisa que me saltou à vista foi todas essas unidades negativas e os clear, mas o problema, pode até nem estar aí, pode vir da <div> (ou div's) que contêm o <ul>.
Sugiro que deixes no mínimo a estrutura da div que contém os <ul> e o CSS relativo a essa estrutura. Ou então, se é um projecto assim tão privado que não podes deixar sequer uma porção do html, acho que esta não é a forma mais indicada de resolver o problema.
<?php
global $get_meta , $post;
if( ( tie_get_option( 'share_post' ) && empty( $get_meta["tie_hide_share"][0] ) ) || $get_meta["tie_hide_share"][0] == 'no' ):?>
<div class="share-post">
<span class="share-text"><?php _e( 'Partilhe!' , 'tie' );?></span>
<ul>
<?php if( tie_get_option( 'share_tweet' ) ): ?>
<li><a href="https://twitter.com/share" class="twitter-share-button" data-url="<?php the_permalink(); ?>" data-text="<?php the_title(); ?>" data-via="<?php echo tie_get_option( 'share_twitter_username' ) ?>" data-lang="en">tweet</a> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script></li>
<?php endif; ?>
<?php if( tie_get_option( 'share_facebook' ) ): ?>
<li><div class="fb-like" data-href="<?php the_permalink(); ?>" data-send="true" data-layout="button_count" data-width="450" data-show-faces="false" ></div></li>
<?php endif; ?>
<?php if( tie_get_option( 'share_google' ) ): ?>
<li style="width:80px;"><div class="g-plusone" data-size="medium" data-href="<?php the_permalink(); ?>"></div>
<script type='text/javascript'>
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</li>
<?php endif; ?>
<?php if( tie_get_option( 'share_stumble' ) ): ?>
<li><su:badge layout="2"></su:badge>
<script type="text/javascript">
(function() {
var li = document.createElement('script'); li.type = 'text/javascript'; li.async = true;
li.src = ('https:' == document.location.protocol ? 'https:' : 'http:') + '//platform.stumbleupon.com/1/widgets.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(li, s);
})();
</script>
</li>
<?php endif; ?>
<?php if( tie_get_option( 'share_linkdin' ) ): ?>
<li><script src="//platform.linkedin.com/in.js" type="text/javascript"></script><script type="IN/Share" data-url="<?php the_permalink(); ?>" data-counter="right"></script></li>
<?php endif; ?>
<?php if( tie_get_option( 'share_pinterest' ) ): ?>
<li style="width:80px;"><script type="text/javascript" src="//assets.pinterest.com/js/pinit.js"></script><a href="http://pinterest.com/pin/create/button/?url=<?php the_permalink(); ?>&media=<?php echo tie_thumb_src('', 660 ,330); ?>" class="pin-it-button" count-layout="horizontal"><img border="0" src="//assets.pinterest.com/images/PinExt.png" title="Pin It" /></a></li>
<?php endif; ?>
</ul>
<div class="clear"></div>
</div> <!-- .share-post -->
<?php endif; ?>
Mete mais de 4.
/* Share */
.share-post {
clear: both;
margin:10px -20px -20px;
padding: 10px 0px 10px 10px ;
background:#F7F7F7;
border-top:1px solid #EAEAEA;
height:20px;
}
.mini-share-post {
clear: both;
margin:10px -20px -20px;
padding:10px 10px 10px 25px;
height:20px;
}
.share-post li , .mini-share-post li{
float: left;
width: 106px;
}
.share-post span.share-text{
background:#FF8500 ;
margin: -10px 10px -10px -10px ;
display:block;
float:left;
color: #FFF;
padding:9px;
font-family: BebasNeueRegular,arial,Georgia, serif;
font-size: 14pt;
}
Para resolver mete o z-index das divs que estão sobrepostas mais baixo.
Há... Estou sempre ansioso de receber Spam de toda a gente. Até de quem não é meu amigo : )