4

我试图将下拉链接中的图标与'pull-left'类对齐,现在它没有垂直对齐到中心,主要问题是我不想使用纯css来解决这个问题,因为我确信有一个带有内置类的引导程序的解决方案,但我自己找不到它们。我对吗?

    <div class="navbar">
        <div class="navbar-inner">
            <a class="brand" href="#">Dbgr.lt</a>
            <ul class="nav">
                <li class="active"><a href="#">Posts</a></li>
                <li><a href="#">Blogs</a></li>
                <li><a href="#">Questions</a></li>
                <li><a href="#">People</a></li>
            </ul>

            <ul class="nav pull-right">
                <li class="dropdown" id="fat-menu">
                    <a data-toggle="dropdown" class="dropdown-toggle text-center" role="button" id="drop3" href="#" style="min-width: 100px;"> 
                        <i class="icon-user pull-left"></i>
                        Admin
                        <b class="caret"></b>
                    </a>
                    <ul aria-labelledby="drop3" role="menu" class="dropdown-menu">
                        <li role="presentation"><a href="#" tabindex="-1" role="menuitem">Action</a></li>
                        <li role="presentation"><a href="#" tabindex="-1" role="menuitem">Another action</a></li>
                        <li role="presentation"><a href="#" tabindex="-1" role="menuitem">Something else here</a></li>
                        <li class="divider" role="presentation"></li>
                        <li role="presentation"><a href="#" tabindex="-1" role="menuitem">Separated link</a></li>
                    </ul>
                </li>
            </ul>
        </div>
    </div>

小提琴:http: //jsfiddle.net/HX6ef/

4

1 回答 1

1

尝试这样的事情

.pull-left{
    margin-top: 3px;
}

jsFiddle:http: //jsfiddle.net/enve/HX6ef/1/

于 2013-07-01T19:58:38.710 回答