eschnell Posted March 2, 2007 Share Posted March 2, 2007 I have a DIV tag that makes the page with say 80%. I need to center the DIV but not the content of the DIV. How would i do that? Thank's for your help, Eddie PS, i am using a CSS file Quote Link to comment Share on other sites More sharing options...
eschnell Posted March 2, 2007 Author Share Posted March 2, 2007 Silly Me! body { text-align: center; min-width: 600px; } #wrapper { margin:0 auto; width:600px; text-align: left; } Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted March 2, 2007 Share Posted March 2, 2007 set the width of the parnet container (fixed or percentage). then you div (I'll call it cont) use div#cont { margin: 0 auto; width: 80%; } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.