• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

I can't center a form inside my page

 
Ranch Hand
Posts: 44
1
Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everybody!

I'm completely lost, i'm trying to center a contact form in my "contact" page of my website but i can't manage to achieve it. I use bootstrap and the whole form is inside a row which i already styled with some css. My question is: how can i center the div i created "second_contaier" inside the greater div "main_container" ? I'm lost, lol

This is the html for the form:



This is the CSS i still have to complete:


This is the page still under construction and this is a screenshot of the form not centered:

 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, as you say that you are using bootstrap you probably be using bootstrap classes to achieve this, but in general, centering block elements can be achieved by giving them a specific width (even if it's a percentage) and and left and right margins of auto.
 
reply
    Bookmark Topic Watch Topic
  • New Topic