Skip to content

Alignment between input field and button #1850

Answered by estevanmaito
dkam asked this question in Help
Discussion options

You must be logged in to vote

Are you trying to make it look like the button is part of the input? If thats the case, you could try something like this:

<div class="relative text-gray-700">
  <input class="w-full h-10 pl-3 pr-32 text-base placeholder-gray-600 border rounded-lg focus:shadow-outline" type="text" placeholder="Regular input"/>
  <button class="absolute inset-y-0 right-0 flex items-center px-4 font-bold text-white bg-indigo-600 rounded-r-lg hover:bg-indigo-500 focus:bg-indigo-700">
    <svg class="w-4 h-4 mr-3 fill-current" viewBox="0 0 20 20"><path d="M3.172 5.172a4 4 0 015.656 0L10 6.343l1.172-1.171a4 4 0 115.656 5.656L10 17.657l-6.828-6.829a4 4 0 010-5.656z" clip-rule="evenodd" fill-rule="evenodd"></path>

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@dkam
Comment options

Answer selected by dkam
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants