# Adding multiple css files to blog detail pages

**URL:** <https://community.hubspot.com/t/adding-multiple-css-files-to-blog-detail-pages/74725>\
**Category:** CMS Development\
**Tags:** css\
**Created:** [February 8, 2023, 12:59pm UTC](https://community.hubspot.com/t/adding-multiple-css-files-to-blog-detail-pages/74725 "2023-02-08T12:59:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SnS\_Nathan](https://avatars.discourse-cdn.com/v4/letter/s/a9a28c/32.png) [@SnS\_Nathan](https://community.hubspot.com/u/SnS_Nathan)\
**Post date:** [February 8, 2023, 12:59pm UTC](https://community.hubspot.com/t/adding-multiple-css-files-to-blog-detail-pages/74725/1 "2023-02-08T12:59:58Z")

</div>

Hey Devs,  
I have 3 blogs on my website that each need different styling. I use a child theme where i created a css file per blog and loaded them next to my main css file (CLEAN X KOO), using the settings menu (view screenshot). However, the custom stylesheets don’t load when i view the page.  
UPDATE: i’ve been able to link te stylesheets at the template level so now all styling for the listing pages comes through. Only the styling for the detail-pages doesn’t work yet.  
Please tell me if i am missing something or if there are better ways to go about this.  
Thank you for your input!

 ![Screenshot 2023-02-08 at 13.58.53.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/3/6/3661444466addef0d3450f58079b349b4dc36942.png)

---

<div class="post-metadata">

**Author:** ![BarryGrennan](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/barrygrennan/32/97794_2.png) [@BarryGrennan](https://community.hubspot.com/u/BarryGrennan)\
**Post date:** [February 8, 2023, 2:30pm UTC](https://community.hubspot.com/t/adding-multiple-css-files-to-blog-detail-pages/74725/2 "2023-02-08T14:30:11Z")

</div>

Hi [@SnS\_Nathan](https://community.hubspot.com/t5/user/viewprofilepage/user-id/512792),

I can’t fully speak to why that’s not working (or indeed how it’s supposed to work) but in modern [HTML + HubL](https://developers.hubspot.com/docs/cms/building-blocks/templates/html-hubl-templates) templates this wouldn’t be the standard way to add css. This might perhaps be a throwback to the old [Drag and Drop Templates](https://developers.hubspot.com/docs/cms/building-blocks/templates/drag-and-drop-templates)

In HTML + HubL templates you’d typically add your css to either your base.html file like:

` {{ require_css(get_asset_url("../../css/main.css")) }}`

or add it right into your themes main.css file like:

`{% include './elements/_typography.css' %}`

As you mention you have three separate blogs that need separate styling, I’m going to assume each has a different template. If that’s the case you could call different css files for each inside the template like:

```lia-code-sample
{% require_head %}
 {{ require_css(get_asset_url("../../css/blog3.css")) }}
{% end_require_head %}

```

* * *

 ![profile2022a.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/2X/7/7273a34ccfe3489fceebc8a36eca751481b59531.jpeg)

**Barry Grennan**

[Freelance HubSpot CMS Developer](https://www.seoanseo.ca?utm_source=HubSpotCommunity)

[Website](https://www.seoanseo.ca?utm_source=HubSpotCommunity) | [Contact](https://www.seoanseo.ca/#contact?utm_source=HubSpotCommunity) | [LinkedIn](https://www.linkedin.com/in/barrygrennan)

---

<div class="post-metadata">

**Author:** ![SnS\_Nathan](https://avatars.discourse-cdn.com/v4/letter/s/a9a28c/32.png) [@SnS\_Nathan](https://community.hubspot.com/u/SnS_Nathan)\
**Post date:** [February 8, 2023, 3:32pm UTC](https://community.hubspot.com/t/adding-multiple-css-files-to-blog-detail-pages/74725/3 "2023-02-08T15:32:16Z")

</div>

Hi Barry,  
turns out i was using one template for all three blogs. I duplicated the template to create 3 individual ones and attached the required css file, works flawlessly now.  
Thank you for the quick response!
