[Resolved] Search icon styling

Home Forums Support [Resolved] Search icon styling

Home Forums Support Search icon styling

  • This topic has 5 replies, 3 voices, and was last updated 5 years ago by Tom.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #874319
    Harris

    Hello,

    How can I add a round blue bg to the searh icon and change the icon color to white?
    Something like https://www.iconfinder.com/icons/539825/blue_browse_circle_discover_explore_search_view_icon

    Thanks!

    #874442
    Leo
    Staff
    Customer Support

    Hi there,

    Give this CSS a shot:

    .search-item a:before {
        background-color: #333;
        padding: 5px;
        border-radius: 50%;
    }

    Adding CSS: https://docs.generatepress.com/article/adding-css/

    Let me know πŸ™‚

    #874467
    Harris

    The circle is not exactly a circle. πŸ™‚

    I adjusted it with
    padding: 8px 5px 8px 5px;

    but not sure if its the appropriate way.

    You can check it in the site url.

    #874575
    Tom
    Lead Developer
    Lead Developer

    For it to be a true circle, you’d need to define a height and width:

    .main-navigation .main-nav ul li.search-item a {
        line-height: normal;
    }
    
    .search-item a:before {
        background-color: #1c74b1;
        border-radius: 100%;
        color: white;
        width: 30px;
        height: 30px;
        line-height: 30px;
    }
    #874696
    Harris

    Perfect.
    Thanks Tom!

    #874987
    Tom
    Lead Developer
    Lead Developer

    No problem πŸ™‚

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.