Over a million developers have joined DZone.

Center HTML Content Horizontally Using CSS

·
Ahh the infamous CSS centering thing... make sure to specify the width and set the right/left margins to 'auto'


#content {
        margin: 0 auto;
        width: 740px;
}


Your HTML would look something like this:

This is centered
Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}