Select to view content in your preferred language

Applying CSS/style to all pages in Hub site

194
1
08-11-2025 02:13 PM
croush2024
Occasional Contributor

Is there a way to apply css/html style to all of the pages on a Hub site?

As far as I can tell, I can independently affect the header, footer, and each page. I currently have 10+ pages on my site and would like to apply some style tags for all the headings and be consistent among the pages.

I can put a style tag in the first text card on a page and it will apply to the rest of that page. But I have to repeat this for each page. And when I decide to change the style, perhaps boost the font-weight of a heading, then I have to go in to each page to change this.

Tags (4)
0 Kudos
1 Reply
MRantala
Emerging Contributor

I was looking for the same functionality, what I figured out was Esri is controlling the scope of the custom css by adding .site-header and .customer-header classes to the header content and to the css selector statement as shown below.

MRantala_1-1759511646146.png

So if you wrap the content of your Text widget with those classes like below, the css from your header is applied since you're forcing it to match the select statement. 

MRantala_0-1759511606916.png

Still cumbersome because as far as I know, you need to add it to each Text Widget but it does offer a way to centralize the css.

Good luck!

 

0 Kudos