[Drupal] How to give a custom class name for a block

| | 1 min read

Have you ever found it difficult to style a block with the block unique ID, if yes then read on this. There is this amazing module named Block Class which will help you in adding a class name to the blocks.

Download and enable the module Block Class

Navigate to the block administration page (ie.,Administration > Structure > Blocks) and you will find a text box named CSS classes where you can add CSS classes.

Hurray! we have a unique class name for the block. This way you do not have to worry about, whether the block unique id will be same in your development servers and in your production servers!!

You may also look into other Drupal module configurations over here. Please let us know if we can provide any further assistance.