Have you tried margin: auto; on your outer div?
pritaeas
Posting Prodigy
9,316 posts since Jul 2006
Reputation Points: 1,178
Solved Threads: 1,467
Skill Endorsements: 86
Create two divs, outer and inner div. The inner div goes inside of the outer div...
<div class="outerDiv">
<div class="innerDiv">
your main content
</div>
</div>
CSS
.outerDiv {width:75%;margin:auto;}
.innerDiv {style as you would normally for your content}
JorgeM
Industrious Poster
4,024 posts since Dec 2011
Reputation Points: 297
Solved Threads: 549
Skill Endorsements: 115
Put that dic inside a another div and set the outside div align to center. Like
<div algin="center">
<div>Your Main Content</div>
</div>
shahbaz13
Junior Poster in Training
52 posts since Jul 2011
Reputation Points: 10
Solved Threads: 4
Skill Endorsements: 0
Here is what i do:
<div class="wrapper">
<div class="main-content">
<h2>Hello World</h2>
</div><!--end of main content -->
</div><!-- end of wrapper -->
/*CSS Styles*/
.wrapper {background:#fff; boder:1px solid #ddd; margin:0 auto; padding:0 20px width:1024px;}
gabrielcastillo
Junior Poster in Training
54 posts since Apr 2012
Reputation Points: 0
Solved Threads: 5
Skill Endorsements: 0