I wanted the button and password input to be right next to each other without a gap, but I ran into this problem and there was a gap between them. I tried to remove the space between this input and the button with padx, pady but I didn't succeed. I need your help to make these two side by side and
This is my code :
window = Tk()
window.title("Password Manager")
window.config(padx=20, pady=20, bg="white")
canvas= Canvas(width=200, height=200 , bg="white", highlightthickness=0)
canvas.config(bg="white")
logo_img = PhotoImage(file="logo.png")
canvas.create_image(100, 100, image=logo_img)
canvas.grid(row=0, column=1)
website_label = Label(text="Website:", bg="white",font=("Arial", 10, "bold"))
website_label.grid(row=1, column=0)
website_label.config(bg="white")
website_entry = Entry(width=35,highlightthickness=2, bd=2)
website_entry.grid(row=1, column=1, columnspan=2)
website_entry.focus()
email_label = Label(text="Email/Username:", bg="white",font=("Arial", 10, "bold"))
email_label.grid(row=2, column=0)
email_label.config(bg="white")
email_entry = Entry(width=35,highlightthickness=2, bd=2)
email_entry.grid(row=2, column=1, columnspan=2)
email_entry.insert(0,"[email protected]")
password_label = Label(text="Password:", bg="white",font=("Arial", 10, "bold"))
password_label.grid(row=3, column=0)
password_label.config(bg="white")
password_entry = Entry(width=21,highlightthickness=2, bd=2)
password_entry.grid(row=3, column=1 )
generate_button = Button(text="Generate Password", width=17, bg="white", font=("Arial", 8), command=generate_password)
generate_button.grid(row=3, column=2)
add_button = Button(text="Add", width=36, bg="white", font=("Arial", 8, "bold"),command=save)
add_button.grid(row=4, column=1, columnspan=2)
window.mainloop()

saveare missing. Ideally, you should condense your code into a small minimal reproducible example for Stackoverflow.