Search
Close this search box.

Documentation

In this article

Categories

Recent articles

CSS Lesson #9 Changing the Dismiss button to a Close button

From Complianz 6.0 onwards you can both enable or disable the dismiss button and close button under Cookie Banner settings. Below CSS settings are deprecated.

At the request of some of our users; is it possible to remove the dismiss button and just add a (x) button to the cookie banner? The answer is yes, and this is an example of how it will look like and how to implement it with some custom CSS.

And this is how it’s done

Removing the dismiss is not necessary, we will use it to create the (x) button. If you know your way around CSS, please refer to our integration here: https://github.com/Really-Simple-Plugins/complianz-integrations/blob/master/close-x-in-banner.php

  1. We will use the dismiss/functional only button to create the (x). The only thing you need to do is enter “x” instead of “dismiss” or any other description.
  2. Now we have to remove the (x) to the right-top corner. For this, you can use the below CSS, and add it to “Appearance – Customize – Additional CSS”.
  3. Now you have a blank space where the dismiss button used to be, the CSS below will also take care of this. Be aware this is based on the Accept All + View Preferences template. Adjustments for other templates might be needed.
  4. And now you’re done, the (x) will still function as a dismiss button.

Custom CSS

Join 900.000 users and install The Privacy Suite for WordPress locally, automated or fully customized, and access our awesome support if you need any help!

Complianz has received its Google CMP Certification to conform to requirements for publishers using Google advertising products.