cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
abiswa10
Level: Powered On

Is it possible to add External CSS links in powerapps? Also, styling inside html <style> tag is not working.Is there any way to do this? It will help in customizing the CSS in powerapps.

I have added a HTMLText control with style tag containing internal css. But, unfortunately it is not working. Only inline css works in powerapps. Is there any way to achieve this or can we add external css files to customize our css.

The text inside HTMLText control is given below:

"<!DOCTYPE html>
<html>
<head>
<style>
a {                               //not working
color: red;
}
.imp{                           //not working
background-color: yellow; 
}
</style>
</head>
<body>
<p style='color:blue'>Blue Text</p>                 //working as it is inline css
<div class='imp'>New Text</div>
<a  href='www.google.com'>google</a>
<div>
<img src='https://visitcentraloregon.com/wp-content/uploads/2015/03/BrokenTopOnycha6-e1523399253239.jpg'>
<img src='http://www.traditionalmountaineering.org/images/BrokenTop_W010.jpg'>
<img src='https://c1.staticflickr.com/6/5480/9756626465_0e43576c3a_b.jpg'>
</div>
<div>
<img src='http://www.roomtoramble.com/wp-content/uploads/2018/08/web_47.jpg'>
<img src='https://www.bendpremierrealestate.com/uploads/agent-1/Broken%20Top%20Hike%2022-.jpg'>
<img src='https://www.bendpremierrealestate.com/uploads/agent-1/No%20Name%20Lake%206-02090.jpg'>
</div> 
</body>
</html>"

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Is it possible to add External CSS links in powerapps? Also, styling inside html <style> tag is not working.Is there any way to do this? It will help in customizing the CSS in powerapps.

Hi @abiswa10 

Unfortunately, PowerApps doesn't support external CSS. The post here describes this in more detail. Essentially, PowerApps injects whatever HTML you specify into the HTML control, but it strips out the 'head' and surrounding 'html'/'body' tags so that the HTML in the complete app remains valid.

https://powerusers.microsoft.com/t5/General-Discussion/HTMLText-with-CSS/td-p/198973

As far as I know, there is no workaround for this. @KickingApps has done some great work in this area and might be able to offer some advise.

3 REPLIES 3
Super User
Super User

Re: Is it possible to add External CSS links in powerapps? Also, styling inside html <style> tag is not working.Is there any way to do this? It will help in customizing the CSS in powerapps.

Hi @abiswa10 

Unfortunately, PowerApps doesn't support external CSS. The post here describes this in more detail. Essentially, PowerApps injects whatever HTML you specify into the HTML control, but it strips out the 'head' and surrounding 'html'/'body' tags so that the HTML in the complete app remains valid.

https://powerusers.microsoft.com/t5/General-Discussion/HTMLText-with-CSS/td-p/198973

As far as I know, there is no workaround for this. @KickingApps has done some great work in this area and might be able to offer some advise.

KickingApps
Level 8

Re: Is it possible to add External CSS links in powerapps? Also, styling inside html <style> tag is not working.Is there any way to do this? It will help in customizing the CSS in powerapps.

@timl 

Thanks for the mention.

@abiswa10 I don't have time at the moment, but I will try to take a look in the next couple of days to see if I might be able to apply anything I have learned that might help you.

KickingApps
Level 8

Re: Is it possible to add External CSS links in powerapps? Also, styling inside html <style> tag is not working.Is there any way to do this? It will help in customizing the CSS in powerapps.

I don't think there is a way to reference an external CCS file. You can do a lot inline but I am not aware of another option.

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 312 members 5,622 guests
Please welcome our newest community members: