與Yii框架的工作,我有lookslike這個頁腳: 如何使頁腳在1行中對齊?
用下面的代碼:
<div id="footer">
<div id="footer_left">
<?php
$this->widget('zii.widgets.CMenu', array(
'id'=>'footerID',
'items' => array(
array('label' => 'About', 'id' =>'leftFooter', 'url' => array('/site/page', 'view' => 'about')),
array('label' => 'Help', 'id' =>'MiddleFooter','url' => array('#')),
array('label' => 'Contact', 'id' =>'rightFooter','url' => array('/site/contact')),
),
));
?>
</div>
<div id="footer_right"><?php echo Yii::t('footer', 'Copyright'); ?> © <?php echo date('Y'); ?> <?php echo Yii::t('footer', Yii::t('footer', 'Momentum Technologies Ltd')); ?></div>
</div>
<?php
// no need to access the rights module if user is not logged in yet
//if (Yii::app()->user->isGuest !== true)//TODO && Yii::app()->user->checkAccess(Rights::module()->superuserName))
{
$translate = Yii::app()->translate;
echo $translate->dropdown();
if ($translate->hasMessages())
{
echo $translate->translateLink('Translate (newPage)');
echo $translate->translateDialogLink('Translate(dialog)', 'Translate page title') . ' | ';
}
echo $translate->editLink(Yii::t('translatemodule', 'Edit translations page')) . ' | ';
echo $translate->missingLink('Missing translations page') . '<br/>';
}
?>
<?php ZHtml::commonJsMessage(); ?>
<!-- page -->
我想用我的CSS一行來獲得這些:
#footer
{
/*padding: 10px;
margin: 70px -20px;
font-size: 0.8em;
text-align: center;
border-top: 1px solid #C9E0ED;
background-color: rgb(122, 185, 240);*/
margin-top: 50px;
padding: 30px;
font-size: 0.8em;
text-align: center;
border-top: 1px solid #C9E0ED;
}
#footer.ul{
display: inline-block;
}
不成功的結果。你能幫助我嗎? 我想要/幫助和聯繫在1行。
把他們都在一個DIV? – Andrew