Style the Search Box Close Icon in Divi


The main header of the Divi theme includes a search icon, which brings up a site-wide search box when clicked. This search box includes a grey "cross" icon which can be used to close the search box. If you're after something other than a grey cross, here's how to style the search box close icon.

Styling the Search Box Close Icon with CSS

Here's an example of CSS code for applying different styles to the search box close icon. It sets the icon to a lighter grey, and turns it red on hover.

.et_close_search_field:after {
.et_close_search_field:hover:after {
    color: red;

This post may contain referral links which may earn a commission for this site

Divi Booster

Hundreds of new features for Divi
in one easy-to-use plugin


Submit a Comment

Your email address will not be published. Required fields are marked *