如何使右侧的标志垂直居中?这是我的contact-bar.css文件(底部是标志):
<?php
/**
* Terrifico
*/
global $data; ?>
<div id="contact-bar">
<p class="label"><?php echo $data['top_panel_contact_text']; ?></p>
<a class="mail" href="mailto:<?php echo $data['top_panel_email'];?>">
<i class="icon-envelope-alt"></i>
</a>
<a class="phone">
<i class="icon-phone"></i>
<span><?php echo $data['top_panel_phone']; ?></span>
</a>
</div><!--contact-bar-->
<div id="flags" style="float: right" margin-top:10px;>
<?php if( function_exists( 'simple_language_switcher' ) ) { ?>
<div id="simple-language-switcher"><?php simple_language_switcher(); ?></div>
<?php } ?>
</div>
答案 0 :(得分:0)
试试这个
#flags{
display:table-cell;
vertical-align:middle;
}
对于内联样式,请尝试
<div id="flags" style="float: right; display:table-cell; vertical-align:middle;">
参考:vertical center an image without knowing dimensions
其他类似问题