Cannot change input width beyond 98px

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Cannot change input width beyond 98px

This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 8 years, 6 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #4185
    philipfarmer
    philipfarmer
    Participant

    Hi there,

    Im in the process of customising the search field input and id like the width to be flexible – 100%, but it appears to always append some inline width of 98px, which i can’t seem to remove. can you help?

    you can find the site here:http://www.humancities.eu/hc2015
    then click the search icon to open the search popup

    look forward to your reply

    Philip

    #4187
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    Of course. In some cases if the search bar is placed to appear on a javascript event (like in your case) the width is not triggered to calculate correctly.

    The best and simplest fix is to force a min-width CSS attribute for the input fields:

    
    .proinput input {
        min-width: 350px;
    }
    

    You can add this code to the Custom CSS field, which you can find on the Theme Options->Custom CSS panel on the search options page.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #4190
    philipfarmer
    philipfarmer
    Participant

    This is great! works perfect.

    I also see that this is the best place to add css as its reset my customised css from the css file. Is this correct?

    #4191
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Yes, but it’s actually outputted into the header as inline CSS, since it’s only a few lines. It’s the best place to put custom CSS, because the changes are visible immediately and it’s stored in the database so the future updates will not delete it.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.