Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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 ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Himai Minh

I can't center a form inside my page

Ranch Hand
Posts: 44
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:

Posts: 67637
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.
Are you okay? You look a little big. Maybe this tiny ad will help:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
    Bookmark Topic Watch Topic
  • New Topic