Create a view helper that centers content

Reusable code to easily center chunks of content and images.

Place:

        <%= start_centering %> 

before the content you want to center, and place:

        <%= end_centering %> 

after it. Note: if you use this inside a div that's located on one side of the page, it centers the content within that div. If you want your content centered within the page, be sure it's not inside a div that's forcing it to one side or another.