Categories

Changing the Default Padding of The Popup by Using Custom CSS

This guide explains how to change a popup's margin, height, and width using custom CSS.

Before we start:

  • There should not be any space between page ID and device type.
  • There should be a space between "block" and the previous definitions.
  • Changes will apply to all if you don’t specify the device type.

1. Let’s remove our popup’s first step’s margins on the desktop only. For this, right-click your popup, click inspect and copy “data-page-id” and “data-device-type” in the box brackets.

data page id in the inspect tool
 [data-page-id="39d21b4b"][data-device-type="desktop"]

2. Write padding-top, padding-bottom, padding-left, and padding-right to change each padding separately.

changing padding with custom css

For this kind of change, you can use the code below by changing its page and block id:

 [data-page-id="39d21b4b"][data-device-type="desktop"]
{
  padding-top: 50px;
  padding-bottom: 100px;
  padding-left: 150px;
  padding-right: 30px;
}

3. If you want to change all paddings together, you can use padding.

arranging padding of the popup

For this kind of change, you can use the code below by changing its page and block id:

[data-page-id="39d21b4b"][data-device-type="desktop"]
{
  padding: 90px;
}
💡 Note: Make sure your CSS is correctly formatted. Once you complete all the settings, save and publish the popup. Do not forget to turn the status toggle on to make your popup visible on your website.

Do you have additional questions about how to add custom CSS to your popup? Contact Us!