Skip to main content

Notifications

Power Pages - Power Apps Portals
Unanswered

Portal- custom css for profile page not working

(0) ShareShare
ReportReport
Posted on by 7,023

Hi Guys, 

 

 One of the thing I wanted to achieve is to hide a particular section in profile page. Using my browser dev tools I got the proper class name. 

 

.crmEntityFormView .section-title {
display: none;
}

 

The above is the css where it is working on my browser dev tool but not on the `custom css` part. 

 

1. Portal > Web pages > Profile > Advanced > Custom css> I have added my css there. 

 

Annotation 2020-08-26 124459.png

 

Is this the right way of doing it or is there any other place? Can any one please help on this. 

  • justinburch Profile Picture
    justinburch on at
    Re: Portal- custom css for profile page not working

    Hi @ragavanrajan,

     

    Oliver is most likely right regarding the conflicting - you can double check by looking at your dev console and seeing if your CSS is further down in the console hierarchy and being overwritten by theme.css.

     

    While his recommendation for JS is good, sometimes it can be poor user experience when this JS loads after the page and results in the area showing and hiding briefly.

     

    You have some alternatives:

    1. Add "!important"

    .crmEntityFormView .section-title {
    display: none !important;
    }

    2. Add another aspect to your selector - now your select will be more defined and will take precedence

    .crmEntityFormView legend.section-title {
    display: none;
    }

     

    Note that if you aren't doing this from the admin panel (when signed in as a Contact with the Administrator Web Role), you will most likely need to reset your Portal cache (login as admin, navigate to /_services/about) in order to guarantee a pushed change.

  • oliver.rodrigues Profile Picture
    oliver.rodrigues 9,079 on at
    Re: Portal- custom css for profile page not working

    Maybe the CSS' might be conflicting, try adding !important and it might do the trick

     

    I would actually normally perform those via JavaScript instead of CSS, please refer to the following post: http://oliverrodrigues365.com/2020/07/19/power-apps-portals-javascript-tip-01-hide-show-elements/

     

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,526

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,907

Leaderboard