0

I'm using twitter Boostrap, my navbar look this way :

<li><a href="#"><i class="icon-bar-chart"></i>
   <span class="hidden-tablet">MyTitle</span></a>
</li>

When I'm trying to replace the href with an anchor, my Bootstrap icon is no longer aligned with MyTitle (not on the same line).

here is what I've tried :

<li><?php echo anchor('mycontroler','MyTitle')?><i class="icon-bar-chart"></i>
   <span class="hidden-tablet"> </span>
</li>

Any clues ?

4

1 回答 1

1

在第二个代码块中,图标位于锚标记之外。要复制第一个块中的代码,您应该:

<li><?php echo anchor('mycontroler','<i class="icon-bar-chart"></i>
    <span class="hidden-tablet">MyTitle</span>')?>
</li>

这也应该解决对齐问题。

于 2013-07-15T21:39:49.130 回答