1155
Views
4
Comments
How to import CSS file
Application Type
Traditional Web

I have tried to import the external CSS file but failed in my traditional app.

1. css file has been uploaded in resource and deployed to the target directory

2.  @import url ("/{module name}/viewpage.css"); 

Please advise

2018-10-29 08-31-03
João Marques
 
MVP

Hi Jessica,


You might find issues uploading CSS as a resource, I would suggest instead on copying your CSS to the application theme Style Sheet and pages as desired.

This post explains very well the issues you find when following this approach.


Regards,
João

2018-09-27 18-20-33
Swatantra Kumar
Champion

Hi Jessica,

You may have to write your custom CSS to the application theme.


Regards,

Swatantra

UserImage.jpg
Jessica Lee

Thank for your advice and suggestion.

If i use 'AddStylessheetTag' to import local css file, it will be overwritten by other.

Is it possible to be located the local css file between 'Screen' and 'inline'?



2018-10-29 08-31-03
João Marques
 
MVP

Hi Jessica,


You have six places where you can place your CSS, why do you need an extra one? Can you explain better what your need is so we can help you better?

In any case, to add CSS to 5. Screen, you can add it on the Style Sheet property in the Screen you want the CSS to be applied:



To add the CSS to 6. Inline, you just need to select the element (in my case an Expression) you want to apply the CSS, select the tab Styles and add your CSS directly:



Regards,
João

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.