How to make a button inside an input

I'm trying to make this input with a search button inside, but I'm not succeeding. How do I do this style?
No description
26 Replies
Zoë
Zoë14mo ago
div
input(type="text")
button
div
input(type="text")
button
Then just remove styling on the input and make the container div look like the input. Do make sure that the input takes up all of the space left of the button, so even if clicking in the corner you select the input. For bonus points you can include a label under the button so clicking anywhere on the div not on the button selects the input
Chaves
ChavesOP14mo ago
I'll try This is my html
Chaves
ChavesOP14mo ago
No description
Chaves
ChavesOP14mo ago
No description
Chaves
ChavesOP14mo ago
Do I have to add a background-color to the container?
Zoë
Zoë14mo ago
Yes, and also remove the background and border from the input
Chaves
ChavesOP14mo ago
Holy shit I'm bugging
Zoë
Zoë14mo ago
Bugging?
Chaves
ChavesOP14mo ago
Isn't working I'll show you
Chaves
ChavesOP14mo ago
No description
Chaves
ChavesOP14mo ago
This is my HTML
Chaves
ChavesOP14mo ago
No description
Chaves
ChavesOP14mo ago
I don't know what's happening, but when I use background-color, it doesn't paint the entire div
Zoë
Zoë14mo ago
Hmm
Chaves
ChavesOP14mo ago
and not even the width changes, I put width: 100%; So the width should be 100% of the size of the parent, which in this case is the wrapper, correct?
Zoë
Zoë14mo ago
I'll quickly make this so you can see what I'm going for. 1 sec
Chaves
ChavesOP14mo ago
ok
Chaves
ChavesOP14mo ago
Bro It worked but you will laugh Look what the problem was:
Chaves
ChavesOP14mo ago
No description
Chaves
ChavesOP14mo ago
No description
Zoë
Zoë14mo ago
🤭 a classic I not only didn't notice that but it took me a couple seconds after you showed me to figure out what the issue was
Chaves
ChavesOP14mo ago
haha Thanks thumbup
Chaves
ChavesOP14mo ago
@z- ::theProblemSolver::
No description
snxxwyy
snxxwyy14mo ago
I don’t believe you can use none on the background color property, only on the background shorthand, you’d have to use transparent
Zoë
Zoë14mo ago
Good catch, didn't clock that
Want results from more Discord servers?
Add your server