question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Labels and text overlap in form if attribute 'value' set in input type 'text', 'email'.

See original GitHub issue

image

<div class="row">

    <div class="col s6 input-field">
        <input type="text" id="fname" required value="James">
        <label for="fname">First Name</label>
    </div>

    <div class="col s6 input-field">
         <input type="text" id="lname" required value="Potter">
         <label for="lname">Last Name</label>
    </div>

</div>

Expected output: image

I am using Version 0.9

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Reactions:13
  • Comments:39 (6 by maintainers)

github_iconTop GitHub Comments

103reactions
Dogfalocommented, Feb 16, 2015

if you are loading it in ajax just add class active to the label

47reactions
mcifonecommented, Oct 26, 2016

@james12 Try this: execute Materialize.updateTextFields(); after the ajax call instead of adding active classes

Read more comments on GitHub >

github_iconTop Results From Across the Web

Floating label overlapping with text on the email type of input ...
I have a form with floating labels, where I am checking if the input is valid or on focus, to raise the floating...
Read more >
Fix Text Overlap with CSS white-space | SamanthaMing.com
However, nowrap can sometimes lead to overlapping text. You can easily fix it by setting the white-space to be normal. div { white-space:...
Read more >
<input>: The Input (Form Input) element - HTML
The <input> HTML element is used to create interactive controls for web-based forms in order to accept data from the user; a wide...
Read more >
Input label does not move up when value or placeholder is sp
I am trying to use mdbootstrap in my meteor app but am running into issues with forms: the label does not move above...
Read more >
How to build a floating label input field - ITNEXT
It doesn't take into account if the input has a value. Our label will also currently overlap any placeholder text in the field....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found