在Foundation导航栏中垂直对齐文本

时间:2015-05-07 04:50:02

标签: css zurb-foundation

我正在尝试使用左下方包含280 x 70图像的顶栏导航菜单对齐右侧的菜单选项。我可以在Foundation中左右对齐文本,但我找不到垂直对齐的方法。

Example Fiddle

<div class="row full-width">
<div class="large-4 columns">
    <img src="MyLogo.png" width="280" height="70" alt="My 280 x 70 Logo" />
</div>
<div class="large-8 columns">
    <nav class="top-bar" data-topbar role="navigation">
        <ul class="title-area">
            <li class="name">
                <div class="logo"> <a href="#"></a>
                </div>
            </li>
            <li class="toggle-topbar menu-icon"> <a href="#"><span></span></a>
            </li>
        </ul>
        <section class="top-bar-section">
            <!-- Right Nav Section -->
            <ul class="right">
                <li class="active"> <a href="/home/index" class="menuMix">
                            <span class="menuMinor">Home Page</span>
                            <span class="menuMain allCaps">Home</span>
                        </a>
                </li>
                <li class=""> <a href="/home/about" class="menuMix">
                            <span class="menuMinor">Who We Are</span>
                            <span class="menuMain allCaps">About</span>
                        </a>
                </li>
                <li class=""> <a href="/home/contact" class="menuMix">
                            <span class="menuMinor">Get In Touch</span>
                            <span class="menuMain allCaps">Contact</span>
                        </a>
                </li>
            </ul>
        </section>
    </nav>
</div>

1 个答案:

答案 0 :(得分:0)

最简单的方法是使用flexbox。

.top-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

Example