Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Use CSS style on HANA Cloud Platform

We have created a SAPUI5 application in which we use CSS. This works fine in the Web IDE (see screenshot).

However when we deploy the application to the SAP HANA Cloud Platform CSS doesn't seem to work (see second picture).

I think this has to do with the relative path to the CSS file. Next picture shows the structure of our application.

In the index file we link the CSS file.

<link rel="stylesheet" type="text/css" href="css/style.css">

In the controller of our view we define for example the Red number field and the Amber number field.

    var oTextviewRed = new sap.ui.commons.TextView({

                                text : "3",

                                design: sap.ui.commons.TextViewDesign.H1


    var oTextviewAmber = new sap.ui.commons.TextView({

                                text : "37",

                                design: sap.ui.commons.TextViewDesign.H1


Does anyone has an idea how to solve this CSS issue in the HANA Cloud Platform?

Thank in advance.

Former Member
Former Member replied

In the WEB Ide the app is started with the index file in which the link to the css file is made.

However when the app is started from the launchpad in HANA Cloud Platform the system starts the app with the component.js file. In the component.js just add the file to the includes and it will work fine.



0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question