Luiz Felipe, this example was taken from the MaterializeCSS showCase :
<div class="input-field col s6">
<input placeholder="Placeholder" id="first_name" type="text" class="validate">
<label for="first_name">First Name</label>
</div>
<div class="input-field col s6">
<input id="last_name" type="text" class="validate">
<label for="last_name">Last Name</label>
</div>
- In the first
div
the label
is fixed at the top and the placeHolder
stays within the input
- At second
div
label
stays within input
and climbs up input
when it focuses
Your question is a bit confusing because the code you posted should have the expected behavior. Are not you confusing something of the question? The expected code or behavior?
Reference:
link