how to creat tel input according to the snippet

71 views Asked by At

enter image description here

how can I create tel input ? just 2 input type tel ? Please, help with css positioning too.

1

There are 1 answers

0
Yves Kipondo On

the markup

<div class="input-group">
  <input type="text" name="" id="" placeholder="+235" class="prefix">  
  <input type="tel" name="" id="" class="uniqpart">
</div>

here are the style

.input-group {
  width: 100%;
  display: flex;
}
input {
  outline: none;
  border: none;
  height: 40px;
  font-size: 1.5em;
  line-height: 40px;
  box-shadow: 0px 1px 8px 1px rgba(0,0,0,0.6) inset;
}

.prefix {
  width: 60px;
  border-radius: 30px 0 0 30px;
  padding: 10px 20px;
}

.uniqpart {
    border-radius: 0 30px 30px 0;
    padding: 10px 20px;
    margin-left: 10px;
    flex-grow: 5;
}

enter image description here