ионная метка не соответствует своей группе - PullRequest
1 голос
/ 22 марта 2019
Метка

[ошибка] в теге div позволяет перейти к другой группе элементов вверху.

ниже код

  <div id="group">
    <div class="col" lines="none">
      <ion-label position="stacked">EXPIRY DATE</ion-label>
      <ion-input placeholder="MM/YY"></ion-input>
    </div>
    <div class="col" lines="none" id="div-security">
      <ion-label position="stacked">SECURITY CODE</ion-label>
      <ion-input placeholder="999"></ion-input>
    </div>
  </div>

  <!-- Inputs with labels that is messing up-->
  <div class="grouping" lines="none">
    <ion-label  display="block">ZIP/POSTAL CODE</ion-label>
    <ion-input placeholder="60001"></ion-input>
  </div>

1007 * СКС *

    ion-card {

  .col {
    margin-right: 6px;
    float: left;
    width: 171px;

    margin-top: 24px;
    margin-bottom: 24px;
    background: transparent;
    border: 1px #000;
    border-bottom-style: dotted;
  }
  .grouping {
    margin-top: 24px;
    background: transparent;
    border: 1px #000;
    border-bottom-style: dotted;
  }
ion-label {
  height: 18px;
  bottom: 49px;
  margin-bottom: 16px;
  font-family: Open Sans;
  font-style: normal;
  font-weight: 800;
  font-size: 12px;
  line-height: 18px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #212121;
}

Ожидаемый результат enter image description here

мой результат enter image description here

1 Ответ

1 голос
/ 22 марта 2019

Попробуйте добавить Display:inline-block; к вашему классу группировки следующим образом:

 .grouping {
    display: inline-block;
    margin-top: 24px;
    background: transparent;
    border: 1px #000;
    width:100%;
    border-bottom-style: dotted;
  }

Сработало для меня, вы можете добавить width:100% (или что угодно, чтобы добавить растяжку). Div по умолчанию показывал блок, который вызывал вашу проблему.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...