Skip to Content

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

Spacing in XML View in WebIDE

Hi Experts,

I am trying to create SAPUI5 Mobile Kapsel App Project. I have selected XML view. When I tried to drag and drop the elements, all the elements are coming adjacent to each other. Meaning to say, if I drag and drop two buttons it is coming like ButtonButton. I want like Button    Button. How to add spacing in xml view? I tried adding Horizontal layout and adding buttons to it, but it is coming like Horizontal LayoutButtonButton. I am not able to drag and drop button inside the Horizontal Layout. 

How to give X and Y coordinates for elements in XML view?



Former Member

You're mixing a few things up here:

  1. in the 'class' property of the xml control, reference the css class name, not the CSS file. But you could also do it not by class name but control id. However, since XML view controls are different than DOM id's, this is generally not a good solution!
    Better to reference by class name:

    <Button id="someBtn" class="customerButton">

    Your class selector should then not be named #customerBtn but .customerBtn (note the preceding dot!)

  2. In your index.html file, add a normal css link reference to your stylesheet file

1 View this answer in context

Helpful Answer

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