In this tutorial we will try to improve the Creative block by adding a new option. The banner alignment is missing and I’ve realized that such an option is needed for different layouts. So in this guide I will show you how to implement a new parameter to the existing block and show you how to register a CSS Stylesheet file.
First let’s register the Stylesheet file. We need to create the file “style.css” and we will use $this->plugin_url variable:
In te previous guide when we have mapped the Creative block. I’ve presented you the most used parameter types. So for alignment we will use a dropdown type, which looks something like this:
In the shortcode file we set the align parameter centered by default and also we will add a specific class in the html code. The class will vary depending on the alignment you set (eg. td-creative-align-center, td-creative-align-right..):
Now let’s write the css code:
Let’s check the result:
Have fun being creative!