Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>To Hide the Border you can use Javascript. <code>onblur</code> event is what you need, onblur means when you remove focus from this input, either by clicking outside of it, or by pressing TAB to give focus to another element.</p> <pre><code>&lt;input type="text" id="myInput" onblur="HideBorder()" onfocus="ShowBorder()" /&gt; function HideBorder() { var myInput = document.getElementById("myInput").style; myInput.borderStyle="none"; } </code></pre> <p>Then when the user clicks back on it, you can use <code>onfocus</code>.</p> <pre><code>function ShowBorder() { var myInput = document.getElementById("myInput").style; myInput.borderStyle="solid"; } </code></pre> <p><strong>UPDATE</strong></p> <pre><code>&lt;input type="text" id="myInput" onblur="HideBorder(this.id)" onfocus="ShowBorder(this.id)" /&gt; function HideBorder(id) { var myInput = document.getElementById(id).style; myInput.borderStyle="none"; } </code></pre> <p>As <strong>Fiona T</strong> suggested, you can do this in CSS (better solution).</p> <p>Give your input a class.</p> <pre><code>&lt;input type="text" class="myInput" /&gt; </code></pre> <p>Then in CSS:</p> <pre><code>.myInput { border-style:none; } .myInput:hover { border-style:solid; } .myInput:focus { border-style:solid; } </code></pre> <p>However, I suggest that you don't hide and show the border, because the size of the input may vary, you are technically removing the border which would be 1px,2px,3px...</p> <p>So change the color instead of that, if your background is white, then...</p> <pre><code>.myInput { border-color:#FFFFFF; } .myInput:hover { border-color:#000000; } .myInput:focus { border-color:#000000; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload