17 June 2016

This snippet shows how to convert select tag to MDL (Material Design Lite). To achieve this you have to use text fields classes.

Source code viewer
  1. <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
  2. <select id="[ID]" name="[NAME]" class="mdl-textfield__input">
  3. <option value=""></option>
  4. <option value="1">browse-tutorials.com</option>
  5. <option value="2">smaily.com</option>
  6. </select>
  7. <label class="mdl-textfield__label" for="[ID]">[LABEL]</label>
  8. </div>
Programming Language: HTML