Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] Hide text placeholder

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #204318
    Armannn
    Participant

    Hello everyone!

    I’ve been trying to hide the “Search…” text through CSS, but haven’t found out a way to do it. Any possibilities to do it?

    <input placeholder="Search..." type="text" name="search" value="">

    #204319
    Paulie_D
    Member

    First choice.

    Don’t put it in the HTML in the first place.

    <input type="text" name="search" value="">
    

    Second Choice

    Color it invisible

    ::-webkit-input-placeholder {
       color:transparent;
    }
    
    :-moz-placeholder { /* Firefox 18- */
       color:transparent; 
    }
    
    ::-moz-placeholder {  /* Firefox 19+ */
       color:transparent; 
    }
    
    :-ms-input-placeholder {  
       color:transparent;
    }
    

    http://codepen.io/Paulie-D/pen/eNyGoV

    #204320
    Armannn
    Participant

    Thank you very much. Works like a charm.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.