html - ionic : multible buttons in header not displaying correct

标签 html css ionic-framework

我正在尝试创建一个左侧有一个按钮的页眉,左侧还有一个标题,右侧有 6 个按钮。但是,只有最后一个按钮显示在右侧,其余按钮显示在左侧。当将所有按钮包装在一个 div 中时,所有按钮都在左侧(output)。并为 div 使用 ionics 按钮栏类在整个宽度上显示它们。

html:

<ion-header-bar style=" background-color:#3A5B89">
      <button menu-toggle="left" > menu</button>
    <h1 class="title" style=" text-align:left; color:white;">Medexter Demo KIS</h1>
      <div class="BTNright">
      <button class="button button-clear button-light BTNright" >Print</button>
      <button class="button button-clear button-light BTNright">Back</button>
      <button class="button button-clear button-light BTNright">Redo</button>
      <button class="button button-clear button-light BTNright">Search</button>
      <button class="button button-clear button-light BTNright">Help</button>
      <button class="button button-clear button-light BTNright">Log Out</button>
      </div>
  </ion-header-bar>

BTNright 样式:

.BTNright{
float:right ;
font-size: 80%;

编辑: How it currently looks like

最佳答案

修改后的 HTML

<ion-header-bar style=" background-color:#3A5B89">
      <button menu-toggle="left" > menu</button>
    <h1 class="title" style=" text-align:left; color:white;">Medexter Demo KIS</h1>
      <div class="BTNright">
      <button class="button button-clear button-light  " >Print</button>
      <button class="button button-clear button-light  ">Back</button>
      <button class="button button-clear button-light  ">Redo</button>
      <button class="button button-clear button-light  ">Search</button>
      <button class="button button-clear button-light  ">Help</button>
      <button class="button button-clear button-light  ">Log Out</button>
      </div>
  </ion-header-bar>

CSS

.BTNright{
position:absolute ;
right:0px;
}

关于html - ionic : multible buttons in header not displaying correct,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36744059/

相关文章:

jquery - 如何在div的某个像素之后放置滚动条

android - 通用 Ionic 应用程序不会在 AVD 中加载

javascript - 我的代码在 codepen 中有效,但在网站中无效

javascript - 如何调整此 jQuery 代码以定位 div?

html - 两个 div,一个滚动,另一个静态

ios - IONIC 应用程序未在 iPhone 设备 Xcode 10 中运行

html - 如何使 ionic 元素响应

html - "background-size: contain"图像内的响应式 DIV 缩放

html - 使用 th :text in thymeleaf 添加 HTML 标签

.net - 是否存在封装 CSS 选项的现有 .net 类