Center A Div That Contains A Contact Form August 30, 2022 Post a Comment How do I center a contact form which is inside a div. I have tried margin:0 auto; and it didn't work. Solution 1: In order to get margin: 0 auto; work you need to set width. #new_div_3 { width: 500px; margin: 0 auto; } Copy Check the fiddle: http://jsfiddle.net/9cMAC/ Solution 2: #new_div_3 { width:100%; display:block; margin:auto; } Copy Should be all you need. Solution 3: Here you go:Baca JugaHow To Change The Div Background Image In Mouse OverApply Css For First LetterHow To Align Span Text And Input Element Horizontally #new_div_3 { margin: 0 auto; position: relative; width: 60%; Copy } check fiddle Share You may like these postsHow To Append Jquery Select2 Values With InitselectionHow Can I Pass A Parameter With Submit Button On FormBootsrap 3 Drop - Down Submenu Links Not Working In Mobile ViewSticky Navigation With Submenu And Smooth Scroll Post a Comment for "Center A Div That Contains A Contact Form"
Post a Comment for "Center A Div That Contains A Contact Form"