Are you a .NET Developer or Contractor interested in working with Sitecore or Dynamics CRM?

Apply for our Mentorship Program. If accepted, we will mentor you on Sitecore and provide you with project to help you build your skills and make some money at the same time. If you are interested send your resume with details on why you want to work with Sitecore or Dynamics CRM to: Chris Williams - chris.williams@techguilds.com or Dennis Augustine - dennis.augustine@techguilds.com We look forward to working with you to achieve your goals.

Friday, May 21, 2010

Horizontally center website structure

There appears to be many ways to horizontally center a page:

1) The "David Walsh" method. This places all the css in the wrapper div.

2) The "simple bits" method. This method centers the body tag and uses the div to left align the content. Here is the link to the full article: http://simplebits.com/notebook/2004/09/08/centering/

I am more of a developer type so I am not sure which way is better but I always use method 2.
I look forward to your comments on which method is better and why.

On a side note, if you look at the David Walsh article, someone made a good comment on making height 100% on the html tag so you always get the scroll bar. Rory Tatum showed me this years ago. Its a good tip for those starting out with css.

html
{
height: 100%;
margin-bottom: 0.01em;
}

I highly recommend checking out some of the other blog articles on both blogs mentioned above. There are some great tips and tricks found there.

If you come across any articles, tips, tricks, or resources please email Susan Fischer at Susan@clinchportal.com and we will post them here.


No comments: