Jump to content

auto margin problem


jonndoe45

Recommended Posts

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

Link to comment
Share on other sites

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>

Link to comment
Share on other sites

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>

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.