0

I try to add another title to an input element, without success. Please find the following fiddle. What I intend to do is display another title on input when I mouse hold down

<input title="this is a test">

input {
    position: relative;
}

input:active:after {
    content:attr(title);
    padding:5px;
    border:1px solid #ccc;
    top:5px;
    right:10%;
    background: #bada55;
}

Here is the fiddle: https://jsfiddle.net/flamant/v47byjLf/5/

EDIT

Hello, I think there was a misunderstanding. I wanted to add the same title as the existing one, but by mouse holding down. I found the solution. Here is the fiddle: https://jsfiddle.net/flamant/v47byjLf/14/

flamant
  • 733
  • 4
  • 15
  • 41
  • What do you mean with "add another title"? – AzafoCossa Jul 25 '20 at 19:44
  • https://jsfiddle.net/1n6dbr7f/ Here is what you're trying to achieve but with JavaScript – Eduards Jul 25 '20 at 19:57
  • Hello LV, there is a misunderstanding, I wanted to add the same title as the existing one but in another way, by mouse holding down the input field. I found the solution, see the fiddle: https://jsfiddle.net/flamant/v47byjLf/14/ – flamant Jul 25 '20 at 21:52

0 Answers0