# Apply CSS class to PDF Print/Download Button

> This is a way to add a class to your print/download button. This way, you can edit the CSS of the print button specifically to your liking.

Source: https://tadabase.com/docs/snippets/apply-css-class-to-pdf-printdownload-button  
Status: Not yet re-checked. Moved from our previous help site and not yet re-checked against the current product. Last edited Sep 20, 2024.

![Screenshot for “Apply CSS class to PDF Print/Download Button”](https://tadabase-docs-assets.s3.amazonaws.com/uploads/images/gallery/2022-09/scaled-1680-/image-1664029639376.png)

This is a way to add a class to your print/download button. This way, you can edit the CSS of the print button specifically to your liking.

**Step 1**

**Hover over the info icon of your PDF print component to get the component ID.**

![Screenshot for “Apply CSS class to PDF Print/Download Button”](https://tadabase-docs-assets.s3.amazonaws.com/uploads/images/gallery/2022-09/scaled-1680-/image-1664029780434.png)

**Step 2**

**Add the following code to the JavaScript tab of the page to create a CSS class.**

> **Note:** Remember to change the component ID to match the one you found in step 1. You may change the class selected to btn-small to match other buttons on your page or btn-print to customize this button specifically.

```
TB.render('component_XX', function(data) {
    data.ele[0].children[0].classList.add("btn-sm");
});
```

![Screenshot for “Apply CSS class to PDF Print/Download Button”](https://tadabase-docs-assets.s3.amazonaws.com/uploads/images/gallery/2022-09/scaled-1680-/image-1664029909332.png)

**Step 3**

**Add the class selector to your CSS tab and customize it as desired.**

![Screenshot for “Apply CSS class to PDF Print/Download Button”](https://tadabase-docs-assets.s3.amazonaws.com/uploads/images/gallery/2022-09/scaled-1680-/image-1664030328848.png)

**Original Community Post:**

[Apply CSS class to PDF Print/Download Button - Community Discussions / Tips and Tricks - Tadabase Community](https://community.tadabase.io/t/apply-css-class-to-pdf-print-download-button/1446)
