jonndoe45 Posted January 20, 2009 Share Posted January 20, 2009 i had to put in effect a javascrit workaround to a css problem (not sure if it is a bug), where the margin-left, margin-right auto thing doesn't seem to work, on either the ladies listing page or the profile page i have put the auto margin in the root div (called mainpix) , not worked, so tried it on a content div witj just the auto margin and a width and still not worked so gave up and just used javascript to do a margin-left shift of the content my web site is www.thaiwife.org, mydefs.css is the stylesheet JD Quote Link to comment Share on other sites More sharing options...
glenelkins Posted January 22, 2009 Share Posted January 22, 2009 hi this will center the content on the page: #outer_container { width: 100%; } #inner_container { margin: auto; width: 600px; } #content_container { width: 600px; } <div id="outer_container"> <div id="inner_container"> <div id="content_container">flngfgh sdfdfgdfg fgdfgdfg</div> </div> </div> Quote Link to comment Share on other sites More sharing options...
TheFilmGod Posted January 23, 2009 Share Posted January 23, 2009 hi this will center the content on the page: #outer_container { width: 100%; } #inner_container { margin: auto; width: 600px; } #content_container { width: 600px; } <div id="outer_container"> <div id="inner_container"> <div id="content_container">flngfgh sdfdfgdfg fgdfgdfg</div> </div> </div> This is div soup! body { width: 100%; } #html_page { width: 1000px; margin: 0 auto; } <body> <div id="html_page"> Contents should be centered! </div> </body> Quote Link to comment Share on other sites More sharing options...
glenelkins Posted January 23, 2009 Share Posted January 23, 2009 the cod you have done is basically the same as mine. i use more <div> elements because embedding things makes cross browser easier! plus i like to have my code broken down more clearly...personal preference! Quote Link to comment Share on other sites More sharing options...
haku Posted January 23, 2009 Share Posted January 23, 2009 I'm personally in agreement with the Film God. Too much use of divs there. It will work, but its using unnecessary divs. The Film God's method works the same, is cross-browser compatible, and uses less divs. 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.