Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Oct 2008
    Location
    Poland
    Posts
    382
    Thanks
    150
    Thanked 2 Times in 2 Posts

    Need help in adding a search for in the header

    Can anybody help me to put the search bar of this site in the header in a nice looking way?

    This is the code:
    PHP Code:
    <form method="get" class="searchform" action="<?php bloginfo('url'); ?>/">
    <div><input type="text" value="<?php _e("Search...","language")?>" onfocus="if (this.value == '<?php _e("Enter keywords...","language")?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e("Enter keywords...","language")?>';}"  name="s" class="s" />
    <input type="submit" class="searchsubmit" value="" /></div>
    </form>
    <div style="clear:both"></div>
    And it looks like more or less like this:


    But I'd like to remove the padding and height, so that it looks more like this:


    And it should be attached to the right, not in the middle.

    BUT... I cannot edit the .searchform in the CSS, because otherwise it will change the properties for the second searchbox that is in the footer.
    AND... I want to avoid copying many lines of CSS just to make this searchform nice looking. Is there some way to:
    • delete padding and height for this search form ONLY;
    • align this form to the right
    • without adding a lot of CSS


    ?

    Thank you
    Attached Thumbnails Attached Thumbnails Need help in adding a search for in the header-1.png   Need help in adding a search for in the header-2.png  

  • #2
    Regular Coder
    Join Date
    Oct 2008
    Location
    Poland
    Posts
    382
    Thanks
    150
    Thanked 2 Times in 2 Posts
    does anybody have a clue what can be done?

  • #3
    New Coder
    Join Date
    Nov 2012
    Location
    India
    Posts
    53
    Thanks
    0
    Thanked 3 Times in 3 Posts
    See, this search bar looks professional.

    http://www.uiparade.com/wp-content/u...n-free-psd.jpg


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •