<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Align UI elements in the center of the page in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/align-ui-elements-in-the-center-of-the-page/qaa-p/14038684#M4906238</link>
    <description>&lt;P&gt;thank you&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 10 Mar 2025 09:45:15 GMT</pubDate>
    <dc:creator>Reeha</dc:creator>
    <dc:date>2025-03-10T09:45:15Z</dc:date>
    <item>
      <title>Align UI elements in the center of the page</title>
      <link>https://community.sap.com/t5/technology-q-a/align-ui-elements-in-the-center-of-the-page/qaq-p/8912411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi @ all! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have another SAPUI5 question. It's amazing how I can get stuck in such simple things as aligning an UI element in a page. How can I, for example, aling a TextField to the center of a row? The UI elements don't have such a parameter as "align"(and "textAlign" only aligns the text that you type in the TextField, not the TextField itself). It seems that by default the UI elements are aligned to the left when you create them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there anyone who can help with this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Monica&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2012 07:36:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/align-ui-elements-in-the-center-of-the-page/qaq-p/8912411</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-08-08T07:36:40Z</dc:date>
    </item>
    <item>
      <title>Re: Align UI elements in the center of the page</title>
      <link>https://community.sap.com/t5/technology-q-a/align-ui-elements-in-the-center-of-the-page/qaa-p/8912412#M3163539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Monica,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Were you able to resolve above issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If yes, can you please share solution?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Hiren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Sep 2013 11:49:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/align-ui-elements-in-the-center-of-the-page/qaa-p/8912412#M3163539</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-09-11T11:49:58Z</dc:date>
    </item>
    <item>
      <title>Re: Align UI elements in the center of the page</title>
      <link>https://community.sap.com/t5/technology-q-a/align-ui-elements-in-the-center-of-the-page/qaa-p/8912413#M3163540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In case this subject may be of interest to someone, here's a solution for the mobile part of UI5 (sap.m library).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I usually use the &lt;A href="https://sapui5.netweaver.ondemand.com/sdk/#docs/api/symbols/sap.m.FlexBox.html#getJustifyContent"&gt;justifyContent&lt;/A&gt; and &lt;A href="https://sapui5.netweaver.ondemand.com/sdk/#docs/api/symbols/sap.m.FlexBox.html#getAlignItems"&gt;alignItems&lt;/A&gt; properties of &lt;A href="https://sapui5.netweaver.ondemand.com/sdk/#docs/api/symbols/sap.m.FlexBox.html"&gt;sap.m.FlexBox&lt;/A&gt; to center my controls.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A more general way to put controls in the center of their container may be via CSS ("margin:auto" for instance), but maybe there's a better way to do that for sap.ui.commons library.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jerome&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Sep 2013 13:37:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/align-ui-elements-in-the-center-of-the-page/qaa-p/8912413#M3163540</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-09-11T13:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: Align UI elements in the center of the page</title>
      <link>https://community.sap.com/t5/technology-q-a/align-ui-elements-in-the-center-of-the-page/qaa-p/8912414#M3163541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Monica,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this you can use CSS to align any of the UI elements at the center of the page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Sep 2013 15:02:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/align-ui-elements-in-the-center-of-the-page/qaa-p/8912414#M3163541</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-09-11T15:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: Align UI elements in the center of the page</title>
      <link>https://community.sap.com/t5/technology-q-a/align-ui-elements-in-the-center-of-the-page/qaa-p/8912415#M3163542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chavda,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; You can add TextField or any other controlls to FlexBox or VBox and you can align them using &lt;/P&gt;&lt;P&gt;"setAlignItems" and "setJustifyContent". You can use the following code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; var layout = new sap.m.VBox("layout", {&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; items:[new sap.m.Input("n1"),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new sap.m.Input("n2"),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new sap.m.Input("n3"),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; layout.setAlignItems("Center");&lt;/P&gt;&lt;P&gt; layout.setJustifyContent("Center");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also you can set position using CSS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vijay.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Sep 2013 06:08:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/align-ui-elements-in-the-center-of-the-page/qaa-p/8912415#M3163542</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-09-12T06:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: Align UI elements in the center of the page</title>
      <link>https://community.sap.com/t5/technology-q-a/align-ui-elements-in-the-center-of-the-page/qaa-p/8912416#M3163543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Monica,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;not quite sure what you mean with "aling a TextField to the center of a row" - do you want to center a textfield in a column of a row?&lt;/P&gt;&lt;P&gt;If yes, then you don't need to use custom css, you can just use the hAlign property of the column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This code creates a centered checkbox in a column:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;oTable.addColumn(new sap.ui.table.Column({&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; label: new sap.ui.commons.Label({text: "Checked"}),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; template: new sap.ui.commons.CheckBox().bindProperty("checked", "checked"),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sortProperty: "checked",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; filterProperty: "checked",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; width: "75px",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hAlign: "Center"&lt;/P&gt;&lt;P&gt;}));&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For those problems I often take a look at the &lt;A href="https://sapui5.netweaver.ondemand.com/sdk/#test-resources/sap/ui/table/demokit/Table.html"&gt;example page&lt;/A&gt; which is very helpful...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greets,&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Sep 2013 07:47:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/align-ui-elements-in-the-center-of-the-page/qaa-p/8912416#M3163543</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-09-12T07:47:26Z</dc:date>
    </item>
    <item>
      <title>Re: Align UI elements in the center of the page</title>
      <link>https://community.sap.com/t5/technology-q-a/align-ui-elements-in-the-center-of-the-page/qaa-p/14038684#M4906238</link>
      <description>&lt;P&gt;thank you&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Mar 2025 09:45:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/align-ui-elements-in-the-center-of-the-page/qaa-p/14038684#M4906238</guid>
      <dc:creator>Reeha</dc:creator>
      <dc:date>2025-03-10T09:45:15Z</dc:date>
    </item>
  </channel>
</rss>

