Skip to main content

Notifications

Community site session details

Community site session details

Session Id : HR8de8QIwvywVlyUqLrCsg
Power Pages - Power Apps Portals
Unanswered

Portal- custom css for profile page not working

Like (0) ShareShare
ReportReport
Posted on 26 Aug 2020 00:46:37 by 7,034 Most Valuable Professional

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
    Microsoft Employee on 26 Aug 2020 at 18:27:21
    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
    9,175 Most Valuable Professional on 26 Aug 2020 at 08:12:57
    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

Thomas Rice – Community Spotlight

We are honored to recognize Thomas Rice as our March 2025 Community…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community

Announcing Our 2025 Season 1 Super Users!

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

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,508 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,440 Most Valuable Professional

Leaderboard
Loading started