Jump to content

Can't centre some content, in css, please help


hedgehog90

Recommended Posts

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.