html - Custom style for input with CSS -


i have design input this:

design

but style, can't that.

my css:

input.custom[type=text]{     border: none;     border-bottom: 1px solid #00cccb; }  .custom::-webkit-input-placeholder {     color: #727272; }  .custom:-moz-placeholder { /* firefox 18- */     color: #727272;   }  .custom::-moz-placeholder {  /* firefox 19+ */     color: #727272;   }  .custom:-ms-input-placeholder {       color: #727272;   } 

my html:

<input type="text" class="custom" placeholder="text goes here"/> 

results:

result

how can style input bottom border and tiny left, right borders, in design?

you can wrap input in span , style :before , :after on accordingly. need use span inputs replaced elements, without psuedo elements can style.

input {    border: none;    border-bottom: 1px solid #00cccb;    padding: 0 10px;    color: #727272;    font-size: 20px;    vertical-align: baseline;  }  input:focus {    outline: none;  }  span {    position: relative;    display: inline-block;  }  span:before,  span:after {    content: '';    display: block;    bottom: 0;    height: 15px;    border-left: 1px solid #00cccb;    position: absolute;  }  span:after {    right: 0;  }
<span><input /></span>


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -