picturepan2 / spectre

Spectre.css - A Lightweight, Responsive and Modern CSS Framework

Home Page:https://picturepan2.github.io/spectre/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tooltip on Input not working

dm-de opened this issue · comments

commented

I was not able to add tooltip to simple Input

<input class="form-input tooltip" data-tooltip="Lorem ipsum dolor sit amet" type="password" maxLength="50">

Any idea?

Tooltips will not work on self-closing elements such as <img> and <input>.

You need to add the tooltip to the parent element of your <input> e.g.:

<div class="tooltip" data-tooltip="Lorem ipsum dolor sit amet">
  <input class="form-input" type="password" maxLength="50">
</div>

@drop1down @kazzkiq is right. You will need to add tooltip to non-selfclosing elements. This is the limitation of pure CSS solution, but still worth using it.