我試圖將Bootstrap 3中的圖形從用戶名下移動到旁邊,但我無法讓它移動。下面是HTML代碼:Bootstrap Glyphicons - 定位問題
<div class="well sidebarbox">
<div class="avatar large pull-left">
<a href="<?php echo $this->baseUrl()?>/<?php echo $this->GetCurrentUserData('name')?>">
<img src="<?php echo $this->GetStorageUrl('avatar') . $this->GetCurrentUserData('avatar')?>">
</a>
</div>
<strong><?php echo $this->GetCurrentUserData('screen_name')?></strong>
<?php $current_user_meta = Zend_Registry::get('current_user_meta');?>
<?php if (isset($current_user_meta['badges'])):?>
<div class="network-badges horizontal">
<?php echo $this->partial('/partial/badges.phtml', array('badges' => $current_user_meta['badges']));?>
</div>
<?php endif;?>
<div class="clearfix"></div>
<hr />
<ul class="nav nav-pills nav-stacked">
<li>
<a href="<?php echo $this->baseUrl()?>/editprofile/edit"><?php echo $this->translate('Edit Profile');?></a>
</li>
<li>
<a href="<?php echo $this->baseUrl()?>/search/posts"><?php echo $this->translate('All Posts');?></a>
</li>
</ul>
</div>
,這裏是我的CSS代碼:
.network-badges.vertical{
padding-left: 1px;
}
.network-badges.horizontal{
white-space: nowrap;
}
.network-badges.vertical{
max-width: 64px;
}
.network-badges .network-badge{
margin: 3px 3px 0 3px;
cursor: pointer;
}
目前,輸出是這樣的:
Richard Evans
[glyphicon]
,我想這是
Richard Evans [glyphicon]
任何意見,將不勝感激。
謝謝
可以使產生的小提琴頁?乍一看,我會說你應該把用戶名放在一個div中,並將所有div浮動到左邊。 – Snowburnt
是的,如果你看看這個,你會看到輸出:www.startrekrisa.com/Picture1.png –
哦,歡呼!我設法做到了! :D謝謝 –