您如何在 Oracle Apex 中整齐地对齐项目?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8360649/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 00:28:54  来源:igfitidea点击:

How do you align items neatly in Oracle Apex?

oracleoracle10goracle-apex

提问by antonpug

I am having the hardest time aligning things in Oracle Apex...basically some pages look ok, but some look like this:

我最难在 Oracle Apex 中对齐内容......基本上有些页面看起来不错,但有些看起来像这样:

enter image description here

在此处输入图片说明

This is considering that all of my pages have the same template/region/col settings: enter image description here

这是考虑到我的所有页面都具有相同的模板/区域/列设置: 在此处输入图片说明

What am I doing wrong?!

我究竟做错了什么?!

EDIT:

编辑:

I did get the positioning to become a little better: enter image description here

我确实让定位变得更好了: 在此处输入图片说明

Here's the template info: enter image description here

这是模板信息: 在此处输入图片说明

采纳答案by Tom

It might be your page template. I've imported the Green Spring theme and tried it out. Since you're using tabs and only using the apex templates, you might've chosen the One level tabs - Left sidebar (fixed width / DIV based). That would explain why your 'Add New User' region is being 'pushed' to the right. When you add another region, it will probably too get pushed. Your menu region, which is not being set off, might be placed in another position in the template, before the sidebar.

它可能是您的页面模板。我已经导入了 Green Spring 主题并试用了它。由于您使用的是选项卡并且仅使用 apex 模板,因此您可能选择了One level tabs - Left sidebar (fixed width / DIV based). 这将解释为什么您的“添加新用户”区域被“推”到右侧。当您添加另一个区域时,它可能也会被推送。您的菜单区域(未设置)可能位于模板中的另一个位置,位于侧边栏之前。

  • Check both regions' display point: are they the same?
  • Has your page template a fixed width sidebar?
  • 检查两个区域的显示点:它们是否相同?
  • 您的页面模板是否有固定宽度的侧边栏?

So here is the code for the body template of the One Level Tabs - Left Sidebar (fixed-width / DIV based)template:

所以这里是模板的body模板的代码One Level Tabs - Left Sidebar (fixed-width / DIV based)

<div id="header">
  <div id="logo"><a href="#HOME_LINK#">#LOGO##REGION_POSITION_06#</a></div>
  #REGION_POSITION_07#
  <div id="navbar">
    #NAVIGATION_BAR#
    <div class="app-user">#WELCOME_USER#</div>
    #REGION_POSITION_08#
  </div>
</div>
<div id="tabs">
  <div class="frame">
    <div class="bg">
      <div class="tab-holder">
        #TAB_CELLS#
      </div>
    </div>
  </div>
</div>
<div id="topbar">#REGION_POSITION_01##REGION_POSITION_04#</div>
<div id="messages">#SUCCESS_MESSAGE##NOTIFICATION_MESSAGE##GLOBAL_NOTIFICATION#</div>
<div id="body">
  <div id="two-col-sb-left">
    <div id="left-sidebar">#REGION_POSITION_02#</div>
    <div id="main-sb-left">
      #BOX_BODY##REGION_POSITION_03#
    </div>
  </div>
</div>

So what you did after your edit, was probably putting the 'Add new user' region to Page Template Region Position 1, just like the Menu region, stacking them up. The default place would have been in <div id="main-sb-left">

因此,您在编辑后所做的可能是将“添加新用户”区域放入Page Template Region Position 1,就像菜单区域一样,将它们堆叠起来。默认位置应该在<div id="main-sb-left">

I'd say that your actual problem still lies with the page template. You should try this: go to shared components > templates, and make a copy of the One Level Tabs - Left Sidebar (fixed-width / DIV based)template (done by clicking the 2 page icon next to it). Then edit this copy (just call it one level template test), and change the body div like this.

我会说您的实际问题仍然在于页面模板。您应该尝试这样做:转到共享组件 > 模板,然后复制One Level Tabs - Left Sidebar (fixed-width / DIV based)模板(通过单击旁边的 2 页图标完成)。然后编辑此副本(只需将其称为一级模板测试),并像这样更改主体 div。

<div id="body">
   #REGION_POSITION_02##BOX_BODY##REGION_POSITION_03#
</div>

Then alter your page template, and set your 2 regions to position #03, and set the template to Reports Region. Your regions will be aligned all the way left, under eachother, and no whitespace to the left.

然后更改您的页面模板,并将您的 2 个区域设置为位置 #03,并将模板设置为Reports Region。您的区域将一直向左对齐,彼此下方,左侧没有空白。

Honestly, that'd be the easiest way to solve the empty sidebar space. There are no other regions in the body that omit the sidebar. At least in this theme!

老实说,这是解决空侧边栏空间的最简单方法。正文中没有其他区域省略了侧边栏。至少在这个主题中!