Lambneck Posted February 26, 2009 Share Posted February 26, 2009 i have a centering issue that I hope someone can help me with. I'm trying to get all the <div>'s inside the body tag to be centered. I have a set up similar to the following: <body> <div id="1"> <div id="2"> <div id="head"></div> <div id="body"></div> <div id="foot"></div> </div> </div> </body> Quote Link to comment Share on other sites More sharing options...
rhodesa Posted February 26, 2009 Share Posted February 26, 2009 DIVs naturally take up the entire width of the page, so until you specify a width on something, there will be nothing to center. Quote Link to comment Share on other sites More sharing options...
Lambneck Posted February 26, 2009 Author Share Posted February 26, 2009 sorry i didn't think to mention that but <div id="1"> does have a set width. Quote Link to comment Share on other sites More sharing options...
dropfaith Posted February 26, 2009 Share Posted February 26, 2009 margin:0 auto; in your css for that div will center it Quote Link to comment Share on other sites More sharing options...
Lambneck Posted February 26, 2009 Author Share Posted February 26, 2009 awhaw! thank you dropfaith. 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.