Как label и суффикс инпута подружить в Bootstrap5
Привет.
Добавляю input полю суффикс, как в доках. В результате input выстраивается с label в одну строку. Но label то должен быть на строке выше. Как поправить html? https://jsfiddle.net/x3esdk27/ <!DOCTYPE html> <html lang="en"> <head> <title>Bootstrap Example</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet"> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script> </head> <body> <div class="container mt-3"> <h2>Input Group</h2> <p>The .input-group class is a container to enhance an input by adding an icon, text or a button in front or behind the input field as a "help text".</p> <p>Use the .input-group-text class to style the specified help text.</p> <form action="/action_page.php"> <div class="input-group mb-3"> <span class="input-group-text">@</span> <input type="text" class="form-control" placeholder="Username" name="usrname"> </div> <div class="input-group mb-3"> <!-- РЕЧЬ ПРО ЭТОТ --> <label for="withprefix" class="form-label">My label</label> <input type="text" class="form-control" placeholder="Your Email" name="email" id="withprefix"> <span class="input-group-text">@example.com</span> </div> <button type="submit" class="btn btn-primary">Submit</button> </form> </div> </body> </html> |
.form-label вынесите перед .input-group
|
Ясно. Погляжу php фрейм умеет ли это
|
Часовой пояс GMT +3, время: 08:27. |