web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Add css class in header
Power Pages
Unanswered

Add css class in header

(0) ShareShare
ReportReport
Posted on by 30

Hi All !

Hope you are well.

I want to add a CSS class in the Hearder header to differentiate the home page from other pages.

I tested this code :

{% if current_page == Home %}
{% assign header_class = 'home' %}
<header class='navbar navbar-inverse navbar-static-top {{ header_class }}' role='banner'>
 {% else %}
 {% assign header_class = 'pageContent' %}
<header class='navbar navbar-inverse navbar-static-top' role='banner'>
 {% endif %}

 

But it does not work. Can anyone help me ? please!

Categories:
I have the same question (0)
  • jypy Profile Picture
    30 on at

    Hi All !

    I need your help. Please ! it's urgent.

    Thank you !

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Pages

#1
Suriyanarayanan V Profile Picture

Suriyanarayanan V 11

#2
Fubar Profile Picture

Fubar 6 Super User 2026 Season 1

#3
oliver.rodrigues Profile Picture

oliver.rodrigues 5 Most Valuable Professional

Last 30 days Overall leaderboard