Button align - not working

trying for a while now to find a way to align this button to fill the end of the right side of the form/div, but couldn’t find on my google search the way to solve it, will appreciate any help!


edit: solved it with “float: right;” in the div that contain the button.


Hi Dya,

If you use the float:right property, your button will jump out of place when you resize the window,

whilst if you’re looking for a more stable approach, I would suggest you give your

.form_container a display of flex and justify its content with space-between,

that way all of its child elements will keep their place as you resize your window.

Adding width:fit-content to your main container will also make sure your box-shadow stays in place as you resize.

Hope that helps :blush:

hey S4muele!
thank you for that! that’s great advice:slight_smile:
I reckon I need to work a lot to understand flex-box.
I’m working on a project for my class, so it’s only a small part, I’ll be happy to show you and hear any suggestions, but I don’t know how to share work that I do in VSC…
cheers for the help so far!

Hey Dya,

Happy I was of help😊

I’m just starting out my coding journey and I’ve only been using CodePen so far, so I would not know how to use VSC.

But if you ever need help with a Code Pen project, feel free to share it with me!

Be well :wink:

Cheers mate will do!
and you’re doing great for a beginner, good luck!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.