hedgehog90 Posted November 20, 2009 Share Posted November 20, 2009 Hi, I'm not so great with php/css, but I am learning very fast. I've got a problem right now that is driving me crazy. Check out this page of my website: http://www.gpstudios.com/playgame.php?gameid=213 What I'm trying to do is center the game content, but it just won't budge. It's stuck to the left with glue, without anthing i can see doing so. I noticed that when I removed the width parameters on the big black box, it center aligned, however, within this big black box is a center aligned black background that needs to set a width, so I can't use this. here is the css code in question: I have indented it to show which divs go into which. .playpage{ clear:both; position:relative; top:10px; } .ninjapart{ float:left; width:948px; text-align:center; } .ninja_top{ width:800px; } .ninja_md{ width:800px; background:#000000; text-align:center; padding:20px 0px 20px 0px; } .ninja_btm{ width:800px; } <div class="playpage"> <div class="ninjapart"> <div class="ninja_top"><img src="images/footimg_topbg.gif" alt="" /></div> <?php include("displaymedia.php"); ?> <div class="ninja_btm"><img src="images/footimg_btmbg.gif" alt="" /></div> </div> and then the rest of the page.... ninjapart is the entire black box ninja top is the top graphic, ninja md is the black background and the game content, ninja btm is the bottom graphic. I'm a dab hand at the functions/codey side of php, but not so good when it comes to arranging the content on pages with css. Thanks in advance for the help Quote Link to comment Share on other sites More sharing options...
hedgehog90 Posted November 20, 2009 Author Share Posted November 20, 2009 I added to ninjapart: margin-left:74px; and removed: width:948px; It's a temporary fix, I eventually want to put a banner ad on the left of the screen, so this still needs to be fixed. 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.