Click here to Skip to main content
15,884,989 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How do I make my website be like the others that when zoomed out, it will just be placed in the center? Just like this page. Thanks.
Posted

1 solution

Set the width, then use some css. For example:
XML
<body>
  <div id="page-wrap">
    <!-- all websites HTML here -->
  </div>
</body>


CSS
#page-wrap {
     width: 800px;
     margin: 0 auto;
}


reference: http://css-tricks.com/snippets/css/centering-a-website/[^]

There is a lot more to this page than meets the eye. Read up on css!
 
Share this answer
 
Comments
Doughnatch 8-Sep-14 23:47pm    
using this means that it will be compatible for any devices?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900