Ben Wordpress şablonları birine yeni twitter butonu eklemek çalışıyorum. Bir örnek için buraya bakınız: http://johnkivus.com/2010/08/12/if-you-build-it/. I düğmenin üst kenarının yerine düğmesi ile hizalanmış metin istiyorum. Aşağıdaki gibi bir yerde twitter butonu koyar kod bölümü:
<div class="postmeta">
<p><a href="http://twitter.com/share" class="twitter-share-button" data-count="none" data-via="kivus">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> <?php _e("Filed under", 'studiopress'); ?> <?php the_category(', ') ?> · <?php _e("Tagged with", 'studiopress'); ?> <?php the_tags('') ?></p>
</div>
PostMeta için CSS:
.postmeta {
font-size: 11px;
text-transform: uppercase;
margin: 0px;
padding: 5px 0px 0px 0px;
border-top: 1px solid #333333;
}
.postmeta p {
margin: 0px;
padding: 0px;
display: inline-block;
}
I'm far from an expert in CSS, so I've only tried the following things: - adding "vertical-align: text-top;" to the css - adding "display: inline-block;" & "vertical-align: top;" - and, as a complete flyer, style='vertical-align: top' to the button.
Ne düğmesinin üst hizalanmış metni almak için en kolay yol olurdu?
UPDATE Based on a suggestion from thomasrutter, I added a style to both the button and the text. This gets me much closer to what I want, however, the elements processed via PHP commands are still showing up aligned with the bottom of the image. The link is the same to see the current state of things: http://johnkivus.com/2010/08/12/if-you-build-it/ however the code is not as follows:
<div class="postmeta">
<p><a href="http://twitter.com/share" class="twitter-share-button" data-count="none" data-via="kivus" style="vertical-align: middle">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> <span style="vertical-align: middle"><?php _e("Filed under", 'studiopress'); ?> <?php the_category(', ') ?> · <?php _e("Tagged with", 'studiopress'); ?> <?php the_tags('') ?></span></p>
</div>