WordPress.org

Ready to get started?Download WordPress

Forums

Want to move Search option from header to navigation bar (7 posts)

  1. anik424
    Member
    Posted 1 year ago #

    Hi, I am using catch box theme.. I want to move Search option from header to navigation bar. I am confused where to edit in header.php file. Please help me..
    my site:- http://mywindows.in

  2. Mohamad Hanafi
    Member
    Posted 1 year ago #

    Hi, anik424.

    Please add a class in searchform.php

    <form method="get" id="searchform" class='searchbar' action="<?php echo esc_url( home_url( '/' ) ); ?>">

    Then set margin-top.

    In style.css add

    .searchbar{margin-top: 237px;}

    ---------------
    Please adjust the value for margin-top which is suit for your website.

    Thanks.

    Hanafi.

  3. Andrew
    Forum Moderator
    Posted 1 year ago #

    To avoid modifying original theme styles, use a custom style/css plugin, then add this style in the allocated plugin area.

    #branding #searchform {
     top: auto;
     margin-top: 5px;
    }
  4. anik424
    Member
    Posted 1 year ago #

    @Mohamad Hanafi

    I have done what u told. But no luck.. navigation bar shifted to right and no Search option..

  5. anik424
    Member
    Posted 1 year ago #

    thnx Mohamad Hanafi and Andrew Nevins.

    I just modified original style.css file by adding these line...

    #branding #searchform {
    top: auto;
    margin-top: 220px;
    }

    Problem Solved!!!

  6. Andrew
    Forum Moderator
    Posted 1 year ago #

    You can cut down your code by removing top: auto;.

  7. anik424
    Member
    Posted 1 year ago #

    okk.. thnx @ Nevins

Topic Closed

This topic has been closed to new replies.

About this Topic