I’m not professional in WordPress and also coding. All I want is to align a navbar elements on my sites to the right. In order to do this, I opened up my site in Chrome and pressed on Inspect Elements and copied the code from my navbar which goes like this:

    <nav class="edgtf-main-menu edgtf-drop-down edgtf-default-nav">
    <ul id="menu-main_menu" class="clearfix"><li id="nav-menu-item-6306" class="menu-item menu-item-type-post_type menu-item-object-page edgtf-menu-narrow edgtf-wide-background"><a href="http://www.minimalstyle.ir/elements/message-boxes/"><span class="edgtf-item-outer"><span class="edgtf-item-inner"><span class="edgtf-item-text">تماس با ما</span></span><span class="plus"></span></span></a></li>
<li id="nav-menu-item-6111" class="menu-item menu-item-type-custom menu-item-object-custom edgtf-menu-narrow edgtf-wide-background"><a href="#"><span class="edgtf-item-outer"><span class="edgtf-item-inner"><span class="edgtf-item-text">درباره ما</span></span><span class="plus"></span></span></a></li>
<li id="nav-menu-item-6110" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children edgtf-has-sub edgtf-menu-narrow edgtf-wide-background"><a href="#"><span class="edgtf-item-outer"><span class="edgtf-item-inner"><span class="edgtf-item-text">ضوابط شهرداری</span></span><span class="plus"></span></span></a>
<div class="edgtf-menu-second" style="height: 0px;"><div class="edgtf-menu-inner"><ul>
    <li id="nav-menu-item-6325" class="menu-item menu-item-type-post_type menu-item-object-page"><a href="http://www.minimalstyle.ir/elements/tabs/"><span class="edgtf-item-outer"><span class="edgtf-item-inner"><span class="edgtf-item-text">روابط پارکینگ</span></span></span><span class="plus"></span></a></li>
    <li id="nav-menu-item-6322" class="menu-item menu-item-type-post_type menu-item-object-page"><a href="http://www.minimalstyle.ir/elements/accordions-toggles/"><span class="edgtf-item-outer"><span class="edgtf-item-inner"><span class="edgtf-item-text">ضوابط طراحی نما</span></span></span><span class="plus"></span></a></li>
    <li id="nav-menu-item-6324" class="menu-item menu-item-type-post_type menu-item-object-page"><a href="http://www.minimalstyle.ir/elements/buttons/"><span class="edgtf-item-outer"><span class="edgtf-item-inner"><span class="edgtf-item-text">مراحل اخذ جواز</span></span></span><span class="plus"></span></a></li>
</ul></div></div>
</li>
<li id="nav-menu-item-6605" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children edgtf-has-sub edgtf-menu-narrow edgtf-wide-background"><a href="#"><span class="edgtf-item-outer"><span class="edgtf-item-inner"><span class="edgtf-item-text">خدمات ما</span></span><span class="plus"></span></span></a>
<div class="edgtf-menu-second" style="height: 0px;"><div class="edgtf-menu-inner"><ul>
    <li id="nav-menu-item-7076" class="menu-item menu-item-type-post_type menu-item-object-page"><a href="http://www.minimalstyle.ir/services/"><span class="edgtf-item-outer"><span class="edgtf-item-inner"><span class="edgtf-item-text">طراحی ابنهی شهری</span></span></span><span class="plus"></span></a></li>
    <li id="nav-menu-item-7075" class="menu-item menu-item-type-post_type menu-item-object-page"><a href="http://www.minimalstyle.ir/services-2/"><span class="edgtf-item-outer"><span class="edgtf-item-inner"><span class="edgtf-item-text">طراحی داخلی، مسکونی، تجاری، اداری، اموزشی و ورشی</span></span></span><span class="plus"></span></a></li>
    <li id="nav-menu-item-7071" class="menu-item menu-item-type-post_type menu-item-object-page"><a href="http://www.minimalstyle.ir/services-all/services-6/"><span class="edgtf-item-outer"><span class="edgtf-item-inner"><span class="edgtf-item-text">بازسازی و نوسازی</span></span></span><span class="plus"></span></a></li>
    <li id="nav-menu-item-7074" class="menu-item menu-item-type-post_type menu-item-object-page"><a href="http://www.minimalstyle.ir/services-3/"><span class="edgtf-item-outer"><span class="edgtf-item-inner"><span class="edgtf-item-text">خاک برداری و نیلینگ</span></span></span><span class="plus"></span></a></li>
    <li id="nav-menu-item-7072" class="menu-item menu-item-type-post_type menu-item-object-page"><a href="http://www.minimalstyle.ir/services-all/services-5/"><span class="edgtf-item-outer"><span class="edgtf-item-inner"><span class="edgtf-item-text">ازمایش خاک</span></span></span><span class="plus"></span></a></li>
    <li id="nav-menu-item-7073" class="menu-item menu-item-type-post_type menu-item-object-page"><a href="http://www.minimalstyle.ir/services-all/services-4/"><span class="edgtf-item-outer"><span class="edgtf-item-inner"><span class="edgtf-item-text">مدلینگ و انیمیشن</span></span></span><span class="plus"></span></a></li>
    <li id="nav-menu-item-6818" class="menu-item menu-item-type-post_type menu-item-object-page"><a href="http://www.minimalstyle.ir/meet-the-team/"><span class="edgtf-item-outer"><span class="edgtf-item-inner"><span class="edgtf-item-text">اجرای سقفهای مرکب عرشه فولادی</span></span></span><span class="plus"></span></a></li>
</ul></div></div>
</li>
<li id="nav-menu-item-6086" class="menu-item menu-item-type-custom menu-item-object-custom edgtf-menu-wide edgtf-wide-background"><a href="#"><span class="edgtf-item-outer"><span class="edgtf-item-inner"><span class="edgtf-item-text">صفحه اصلی</span></span><span class="plus"></span></span></a></li>
</ul></nav>

So in styles.css in editor of WordPress I used float:right for menu-main_menu like this:

#menu-main_menu li{
float:right
}

But it does not work… I wonder am I trying to align the right element or I have to align another element.. So if you know how to solve this problem, please let me know… cause I REALLY need this! Thanks in advance..

Read more here: How to float a navbar to right in WordPress


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: