How to override CSS?

This topic contains 7 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 3 months, 2 weeks ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #47132
    dot832
    dot832
    Participant

    Hi,

    For the following page – https://seedintegritypledge.com/search-for-non-gmo-seeds/

    I want to set a border color for the text box (search by company) and selection field (search by state). For the text box, I have identified this style which sets border to none with !important. How can I override this border setting?

    div.asp_w.asp_s.searchsettings input[type=’text’]:not(.asp_select2-search__field), div.asp_w.asp_sb.searchsettings input[type=’text’]:not(.asp_select2-search__field) {
    width: 86% !important;
    padding: 8px 6px !important;
    margin: 0 0 0 10px !important;
    background-color: #FAFAFA !important;
    font-size: 13px;
    border: none !important;
    line-height: 17px;
    height: 20px;
    }

    Thank you.

    #47140
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Basically if the CSS is going to be printed inline (which will have higher specificity), then this will work:

    div.asp_sb.searchsettings fieldset input[type='text'] {
      border: 1px solid red !important;
    }
    Best,
    Ernest Marcinko

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


    #47245
    dot832
    dot832
    Participant

    Hello,
    I’m sorry but this CSS isn’t working. The border: none !important is still taking precedence.

    #47249
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    All right, then this should very likely do the trick:

    div.asp_w.asp_sb.searchsettings fieldset input[type='text'][name*=aspf] {
      border: 1px solid red !important;
    }
    Best,
    Ernest Marcinko

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


    #47255
    dot832
    dot832
    Participant

    I’m sorry but this didn’t work either. The CSS is on line 160.

    See attached screen print

    Attachments:
    You must be logged in to view attached files.
    #47257
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Interesting, let’s try something way more specific:

    body div div.asp_sb.searchsettings fieldset input[type='text'][name*=aspf]:not(.asp_select2-search__field) {
        border: 1px solid #005d4b !important;
    }
    Best,
    Ernest Marcinko

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


    #47265
    dot832
    dot832
    Participant

    It worked!! Thank you!

    #47270
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Great! You are welcome!

    Best,
    Ernest Marcinko

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


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

You must be logged in to reply to this topic.