Click here to Skip to main content
15,886,788 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am creating a form with an insert button, it is not working for me, What I need to do now? I just wanted this insert button should be in centralize.

What I have tried:

<div class = "form-row clearfix row-margin">
<div class = "col-md-6 mb-3">
<Label> Description </ label>
<textarea class = "form-control" id = "addNewEventDescription" rows = "1" required> </textarea>
</ Div>
<div class = "col-md-3 mb-3 text-center">
<button type = "submit" class = "btn btn-primary m-10" id = "addNewEventBntInsert"> Insert </button>
</ Div>
</ Div>
Posted
Updated 12-Aug-19 18:13pm
Comments
phil.o 9-Aug-19 7:02am    
"it is not working" is not a valid issue description, because it tells us nothing about the problem you are encountering.
Please improve your question and provide an actual description:
- what is your code supposed to do?
- what does it do instead?
- are there any error messages?
Matthew Dennis 9-Aug-19 10:08am    
Is this block of html inside a form tag?
[no name] 13-Aug-19 0:12am    
Yes.

1 solution

It's not clear from your question what the problem is. At a guess, I suspect you want the button vertically centered in the space created by the label and the text area. In which case, you simply need to add the align-items-md-center class to your row:
HTML
<div class="form-row clearfix row-margin align-items-md-center">
Demo[^]
Flex · Bootstrap[^]
A Complete Guide to Flexbox | CSS-Tricks[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900