Search code examples
drupal-8dkan

Add custom CSS in DKAN website for an image / append a class Name to the HTML element in DKAN


Sample Image

I want to add a CSS for the above image like

.img{ float : right }

how could I add that in the DKAN If I edit the panel it's showing the options like in the following image:

Sample Image

or how do I add a class name to the HTML element like in the below example
<a class="right">Image</a>

Thanks in advance


Solution

  • To add your own CSS you can:

    1. Create your own Sub-theme

    2. Or download and enable the css_editor module.

    I would only recommend #2 for a limited number of CSS changes.