# Styling for a logo tile custom module

**URL:** <https://community.hubspot.com/t/styling-for-a-logo-tile-custom-module/9623>\
**Category:** CMS Development\
**Created:** [July 27, 2018, 6:06am UTC](https://community.hubspot.com/t/styling-for-a-logo-tile-custom-module/9623 "2018-07-27T06:06:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt1986](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/matt1986/32/48165_2.png) [@Matt1986](https://community.hubspot.com/u/Matt1986)\
**Post date:** [July 27, 2018, 6:06am UTC](https://community.hubspot.com/t/styling-for-a-logo-tile-custom-module/9623/1 "2018-07-27T06:06:55Z")

</div>

I’m trying to create a custom module to display logos on our partner page. I would like each custom module to be have 25% width and have a display of ‘inline-block’ to ensure that there are 4 tiles across each row. However i can’t seem to reduce the width of the custom module. I have provided a screenshot below of the div/class which is preventing me from doing this (which is a hubspot made div/class). I’m just not sure how to fix the issue using this div/class. I could fix it by targeting each custom module individually however this isn’t practical. I’m looking for a global solution, which will make sure every time i add this custom module it will be 25% in width. The page where i’m trying to implement this is [http://www-eurobase-com.sandbox.hs-sites.com/our-partners?hs\_preview=CYWkVcAE-6002374269](http://www-eurobase-com.sandbox.hs-sites.com/our-partners?hs_preview=CYWkVcAE-6002374269) Thanks for any help! kind regards Matt

---

<div class="post-metadata">

**Author:** ![lewisvrobinson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/lewisvrobinson/32/50978_2.png) [@lewisvrobinson](https://community.hubspot.com/u/lewisvrobinson)\
**Post date:** [July 27, 2018, 6:50am UTC](https://community.hubspot.com/t/styling-for-a-logo-tile-custom-module/9623/2 "2018-07-27T06:50:13Z")

</div>

If your template uses the drag and drop editor, you should be able to create some 25% columns and rows pretty easily that you can pop your modules into.

Alternatively you could create a [repeater](https://designers.hubspot.com/docs/modules/repeating-fields-and-loops) inside your custom module and handle the layout in there. At the moment, hubspot is wrapping each of your modules in a div which is why they’re displaying full-width.

---

<div class="post-metadata">

**Author:** ![Matt1986](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/matt1986/32/48165_2.png) [@Matt1986](https://community.hubspot.com/u/Matt1986)\
**Post date:** [July 27, 2018, 8:28am UTC](https://community.hubspot.com/t/styling-for-a-logo-tile-custom-module/9623/3 "2018-07-27T08:28:17Z")

</div>

Hi Lewis,  
Thanks for your reply. I would like to solve this by targeting the HubSpot wrapper that surrounds the custom module. But I can’t seem to identify the class which I need to use to target this.  
Can you let me know this class? That issue I’m having at the moment.  
Thanks for your help  
Regards  
Matt

---

<div class="post-metadata">

**Author:** ![tjoyce](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tjoyce/32/88832_2.png) [@tjoyce](https://community.hubspot.com/u/tjoyce)\
**Post date:** [July 27, 2018, 11:47am UTC](https://community.hubspot.com/t/styling-for-a-logo-tile-custom-module/9623/4 "2018-07-27T11:47:14Z")

</div>

@Matt1986 - Since you can’t traverse **up** the DOM, you can only traverse **down**. You would need to drop a little JS into your page to assign a class to the parent of your module. Then, you can use CSS to style it how you like.

```auto
$(function(){
 $('.logo-tile-wrapper').parent('div').addClass('logo-tile-super-wrapper');
});

```

And then add the following CSS

```auto
.logo-tile-super-wrapper {
 width: 25%;
 display: inline-block;
 text-align: center;
 float: left;
}

```

* * *

If this answer helped, please, mark as solved 😄

* * *

[tim@belch.io](mailto:tim@belch.io) | [forms.belch.io](https://forms.belch.io) | Design your own Beautiful HubSpot Forms; No coding necessary.

Drop by and say Hi to me [on slack](http://slack.belch.io/).

---

<div class="post-metadata">

**Author:** ![Matt1986](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/matt1986/32/48165_2.png) [@Matt1986](https://community.hubspot.com/u/Matt1986)\
**Post date:** [July 29, 2018, 3:22pm UTC](https://community.hubspot.com/t/styling-for-a-logo-tile-custom-module/9623/5 "2018-07-29T15:22:44Z")

</div>

Thank you!!

I’ve just added the script and its done exactly what i wanted.

Cheers
