admin管理员组

文章数量:1294178

I want the menu of this site to look like the menu of this site.

It's clear that they use display table and table cell but not sure how to implement it, been playing with css for a while, couldn't nail it. Didn't found a plugin that does the job but css should do. Do I have to create a custom menu layout? I think not.

I'm using a wordpress menu with this plugin, and the header.php

    <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_id' => 'menu-header', 'fallback_cb' => false, 'container' => false ) ); ?>

    <a href="<?php echo esc_url( CP_ADD_NEW_URL ); ?>" class="obtn btn_orange"><?php _e( 'Post an Ad', APP_TD ); ?></a>

    <div class="clr"></div>

I want the menu of this site to look like the menu of this site.

It's clear that they use display table and table cell but not sure how to implement it, been playing with css for a while, couldn't nail it. Didn't found a plugin that does the job but css should do. Do I have to create a custom menu layout? I think not.

I'm using a wordpress menu with this plugin, and the header.php

    <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_id' => 'menu-header', 'fallback_cb' => false, 'container' => false ) ); ?>

    <a href="<?php echo esc_url( CP_ADD_NEW_URL ); ?>" class="obtn btn_orange"><?php _e( 'Post an Ad', APP_TD ); ?></a>

    <div class="clr"></div>
Share Improve this question edited May 26, 2017 at 21:01 Lynob asked May 26, 2017 at 20:36 LynobLynob 1011 gold badge1 silver badge13 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 2

Editing my answer. See the screenshot, if it's close enough to what you're looking for, try adding the following to your stylesheet.

.header_menu_res ul li {
    margin: 0 0 20px;
    width: 25%;
}

.menu-item i._mi, .menu-item img._mi {
    display: block;
    float: left;
}
.menu-item span {
    margin-top: 8px;
    display: block;
    margin-left: 60px;
}

本文标签: cssdisplay menu as table layout