CSS Lesson #2: Adding Box-Shadow to your Cookie Notice

A simple guide

The standard templates and the Custom CSS possibilities makes it possible to design your Cookie Notice to suit the style of your website. We will start a weekly lesson how to add design elements to your Cookie Notice using Custom CSS. You want to try yourself? Visit https://www.w3schools.com/cssref/ for an extensive overview of CSS properties.

You can add Custom CSS in our editor, in your theme’s Custom CSS editor or any plugin that provides CSS control. Because every WordPress website is different we will work with the addition of !important to override any CSS currently loaded on your webpage.

Lesson#2: Adding Box-Shadow to your Cookie Notice

The box-shadow is a great way to put depth on your cookie banner. Complianz comes with a minimal template which adds the box-shadow by default, but if you want to change or add it to another template you will need the following CSS properties:

For below banner we used the following CSS properties:

.cc-window { to add shadow to the entire window (box) }

Copy/Paste below code and try it yourself!

/* adding box shadow to the cookie notice*/

box-shadow: 0px 0px 15px -5px rgba(0,0,0,0.75);


The box-shadow property has the following options:

0px 0px 15px -5px rgba(0,0,0,0.75);

Horizontal position: 20px is to the right. -20px is to the left.

0px 0px 15px -5px rgba(0,0,0,0.75);

Vertical position: 20px is to the down. -20px is up.

0px 0px 15px -5px rgba(0,0,0,0.75);

Blur radius: 0px is no blur. Everything above increases blur.

0px 0px 15px -5px rgba(0,0,0,0.75);

Spread: Below 0px is less than the width of the box.

0px 0px 15px -5px rgba(0,0,0,0.75);

rgbAlpha will add opacity and color to your shadow.  0.75 is the opacity.

For example

box-shadow: box-shadow: 40px -40px 35px -10px rgba(92,168,168,0.5); or inset shadow /gradient with
box-shadow: inset 0px 25px 150px 54px rgba(92,168,168,0.5);

Subscribe to our weekly CSS Lessons

    For EU Subscribers | Privacy Statement
    For USA Subcribers | Privacy Statement

  • This field is for validation purposes and should be left unchanged.
© Copyright - Complianz 2019

Complianz Privacy Suite 3.1 is live!

See our new features and available documentation. Read more