WordPress.org

Support

Support » Plugins and Hacks » How to float right

How to float right

Viewing 8 replies - 1 through 8 (of 8 total)
  • ilanaguttman
    Member

    @ilanaguttman

    You can do this by editing searchform.php in the theme folder and adding some CSS. I found that each of the items in the menu had a
    <li> class, so I added <li class="menuSearch"></li> around the code.

    Then in style.css I added

    .menuSearch{
        display: inline;
        float: right;
        margin-right: 7px;
        position: relative;
        list-style-type: none;
    }

    I hope this helps!

    Rdesigner
    Member

    @rdesigner

    Hi,

    Can you please explain better what to do to get the search box float on the right? I tried to do what you said, but nothing changes.

    I added via FTP <li class=”menuSearch”> to searchform.php in the theme folder. Then I added above code to custom CSS.

    What did I do wrong?

    Thanks for your answer
    Rianne

    ilanaguttman
    Member

    @ilanaguttman

    Hi Rianne,

    Maybe you have a conflicting style somewhere else? Please send me the link to the site and maybe I can help further.

    Ilana

    Rdesigner
    Member

    @rdesigner

    Hi llana,
    Sorry I was away for a few days. This is the link to my site.
    http://e-wise.nhtv.nl/wordpress
    I put in the code as you said, but the search box doesn’t move to the right.

    ilanaguttman
    Member

    @ilanaguttman

    I’m celebrating a holiday this week. Will do my best to take a look early next week.

    Jagdeep Bhuyan
    Member

    @jagdeep-bhuyan

    Sorry to answer latly…
    just open SearchBox-On-Nav_Menu.php file in the plugin folder.
    then find the line
    $items .= '<li>' . $searchform . '</li>';
    and replace the line with this —
    $items .= '<li style="float: right;">' . $searchform . '</li>';

    This will work

    Unfortunately, it doesn’t. I’ve tried every trick in the CSS book and this search box won’t budge.

    nastazia1
    Member

    @nastazia1

    $items .= ‘<li style=”float: right; margin-right: -200px;”>’ . $searchform . ”;

    try this it works

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to float right’ is closed to new replies.