0

Всем привет, можно ли разместить элемент legend снизу и центрировать его, если нет то каким способом можно выполнить данную задачу?

h1,p {
  text-align:center;
};

.legend {
  padding: 0 10px;
};
<fieldset>
  <h1>The Best Services</h1>
  <p>We provide the best services in the world We provide the best services in the world We <br>provide the best services in the world</p>
  <legend>
    <button>Click</button>
  </legend>
</fieldset>

1
  • В css что у вас творится? Лишние ;, а класса legend у вас в принципе в коде нет. 20 сен 2018 в 15:42

1 ответ 1

1

Просто, только обертка нужна для текста внутри fieldset.

h1,
p {
  text-align: center;
}

fieldset,
legend,
.wrapper {
  transform: rotate(180deg);
}

legend {
  padding: 0 10px;
}
<fieldset>
  <div class="wrapper">
    <h1>The Best Services</h1>
    <p>We provide the best services in the world We provide the best services in the world We <br>provide the best services in the world</p>
  </div>
  <legend align="center">
    <button>Click</button>
  </legend>
</fieldset>

1
  • Спасибо очень помог!
    – Alex
    20 сен 2018 в 15:50

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.