WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How do I resize my search bar? (4 posts)

  1. brittanywigand
    Member
    Posted 5 years ago #

    These are the codes in my style.css:

    #searchform input{
            background:#fff;
            padding:3px;
            margin-top:10px;
            border:1px solid #000;
            color:#555;
            font-family:'Arial';
            font-size:8pt;
    }
    #searchform input[type="submit"] {
            cursor:pointer;
    }
    
    #searchform input[type="submit"]:hover {
            background:#fff;
            border-color:#eee;
    }

    That's the only thing I can find about them in it... Also here's the code in searchform.php:

    <br /><form method="get" id="searchform" action="<?php bloginfo('url'); ?>/">
    <div><input type="text" value="<?php the_search_query(); ?>" name="s" id="s" /><br />
    <input type="submit" id="searchsubmit" value="Search" />
    </div>
    </form>

    My site is BrittanyWigand.com and my theme is Silver Dreams...

    Help?!

  2. SpankMarvin
    Member
    Posted 5 years ago #

    Either find this id in your css or add it (probably just add the following code):

    #sidebar form#searchform input#s {
    width: 200px;
    }

    Or whatever your desired width is...? Any good?

    John

  3. Or without css, put a size in the search php, i.e. "45", like this. Smaller or larger value for whatever width you want:

    <form method="get" id="searchform" action="<?php bloginfo('url'); ?>/">
    <div>
    <input type="text" value="<?php the_search_query(); ?>" name="s" id="s" size="45" />
    <input type="submit" id="searchsubmit" value="Search" />
  4. brittanywigand
    Member
    Posted 5 years ago #

    Thanks, SpankMarvin your code worked. <33333333

Topic Closed

This topic has been closed to new replies.

About this Topic