Search code examples
csswordpresscss-floatalignmentright-align

Aligning NavBar Right cause NavBar to disable


I'm trying to right align my NavBar, but whenever I add float:right, the navbar moves to the right, but seems to become disabled.

See here: goo.gl/46yUrt

Code:

/**
 * 4.2 Navigation
 * ----------------------------------------------------------------------------
 */

.main-navigation {
    clear: both;
    margin: 0;
    max-width: 100%;
    min-height: 45px;
    position: relative;
    float:right;
}

I'm using a custom modified version of the TwentyThirteen theme.

Ideally, I'd like to have the menu beside the logo at the top, both centered.


Solution

  • float:right seems to be positioning the nav bar beneath another element. Adding z-index:1 fixes that, but you'll still have to adjust the position of the bar.