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

Notifications

Announcements

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Pages

#1
Jerry-IN Profile Picture

Jerry-IN 71

#2
Fubar Profile Picture

Fubar 62 Super User 2025 Season 2

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard