[Modal]: Input fields and label incorrectly aligned
See original GitHub issueWhen using input fields inside a modal they aren’t aligned properly:
<a class="waves-effect waves-light btn" data-login>Login</a>
<div id="modal1" class="modal">
<div class="modal-content">
<h4>Login</h4>
<div class="row">
<div>
<input value="Alvin" id="first_name2" type="text">
<label class="active" for="first_name2">Username:</label>
</div>
</div>
</div>
<div class="modal-footer">
<a href="#!" class=" modal-action modal-close waves-effect waves-green btn-flat">Agree</a>
</div>
</div>
I am using meteor, and the button click event is registered in the following way:
'click [data-login]': (event: Event, template: Template) => {
$('#modal1').openModal();
}
Issue Analytics
- State:
- Created 8 years ago
- Comments:6
Top Results From Across the Web
Elements within a bootstrap modal form are not lining up
I was expecting the "radio" buttons and the date input text field will align, but they don't. Help, can someone point to things...
Read more >How to Align Lightning Component Label and Fields
It's never hard to make the input field and the label appear in 1 line where the input box has similar alignment with...
Read more >Common problems - The jQuery replacement for select boxes
Select2 does not function properly when I use it inside a Bootstrap modal. This issue occurs because Bootstrap modals tend to steal focus...
Read more >How to pass data into a bootstrap modal? - GeeksforGeeks
Example 1: In this approach, the web page consists of two input fields Name and Marks which accepts input from the user. The...
Read more >Box alignment in Flexbox - CSS: Cascading Style Sheets | MDN
The first item overrides the align-items values set on the group by setting align-self to center . One. Two. Three has extra text...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I tested it in different conditions at it appears it has to do with meteors template rendering in combination with the nav bar.
If I have the button (to display the navbar) inside a navbar and the modal from a different template, the alignment seems to be incorrect:
If instead the modal definition is inside the
layout.html
it works correctly.Therefore I assume it has something to do with rendering templates and the navbar, as if I use the same template (including the modal definition) outside the navbar it displays everything in the correct way.
@Zerebokep please provide a codepen illustrating the problem