Home>Support>Nav Menu Float

Nav Menu Float

By Franz_dvp, 10 years ago. Last reply by Andrew Misplon, 10 years ago.
Notice: This thread is over two years old; the information may be outdated. Please consider creating a new thread if you require free support. If you have an active SiteOrigin Premium license, you can email our premium support desk at [email protected].

Hi guys!

I’m building a new website and I chose your Vantage theme for it.

I would like to align the main nav menu to the right, next to the search form (like here on SiteOrigin.com).
I searched the style.css and I added “float: right” to this code (line 646):

.main-navigation ul{
list-style:none;
margin:0;
padding-left:0;
zoom:1;
float: right;
/* Second level menu items */
}

The problem is that the menu moves correctly to the right, but at the same time – and I don’t know why – the contact form in the page moves left.
The contact form is made with Contact Form 7 plugin and the page is built with Page Builder. I created a row with three columns and I pasted the contact form code in the middle one, to get the form centered in the page.

Is this the right way to align the menu to the right?

Thank you very much indeed for your help, I really like your theme and hope to solve the problem to continue working on it.

Best,

Francesco

URL: http://davidecarrer.tk/contatti/

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 10 years, 9 months ago Franz_dvp

    Problem solved!

    I needed to modify the code on line 662, not 646:

    .main-navigation ul li{
    display:block;
    position:relative;
    float: right;
    }
    

    Thank you anyway. I hope other people will find this post helpful.

    Best,

    Francesco

  2. 10 years, 9 months ago Andrew Misplon
    Hi, I Work Here

    Hi

    Thanks for running Vantage.

    Please remember that any changes made to theme files like style.css will be lost during theme updates. Code level changes need to be kept in a child theme or in the case of CSS you can insert your changes under Appearance > Custom CSS.

    The best way to right align the main menu would be to insert the following under Appearance > Custom CSS:

    /* Vantage right align the main menu */
    
    .main-navigation ul {
    text-align: right;
    }
    
    .main-navigation ul li {
    display: inline-block;
    float: none;
    }
    
    .main-navigation ul ul li { 
    text-align: left;
    }
    

    Hope that helps.

  3. 10 years, 9 months ago Franz_dvp

    Hi Andrew,

    Thank you very much indeed for your help! Your answer totally solved my problem.

    Best regards,

    Francesco

  4. 10 years, 9 months ago Andrew Misplon
    Hi, I Work Here

    Super, glad that did the trick. All the best.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More