Page 1 of 3 123 LastLast
Results 1 to 10 of 22
  1. #1
    Join Date
    Mar 2011
    Posts
    19
    Plugin Contributions
    0

    Default Can Not Center Wesite with margin: auto;

    I can not figur out how to center my website. I have searched the forums and i have tried changing the margin in my css to margin: auto;

    But it is not working!!!! Some please help i have to get this website done soon.

    newest version of zen.
    My Site
    http://www.midamericasportz.com/zencart

    Here is my css.
    http://www.midamericasportz.com/zenc...stylesheet.css

  2. #2
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: Can Not Center Wesite with margin: auto;

    Quote Originally Posted by cageman555 View Post
    I can not figur out how to center my website. I have searched the forums and i have tried changing the margin in my css to margin: auto;

    But it is not working!!!! Some please help i have to get this website done soon.

    newest version of zen.
    My Site
    http://www.midamericasportz.com/zencart

    Here is my css.
    http://www.midamericasportz.com/zenc...stylesheet.css
    These sections of your stylesheet are conflicting with each other and the last one is overriding all of the other settings for the #mainWrapper rule.
    I've highlighted what should be deleted.

    #mainWrapper {

    margin: auto;

    background-color: #ffffff;

    text-align: left;

    width: 750px;

    vertical-align: top;

    border-right: 1px solid #9a9a9a;


    }

    #contentMainWrapper, #logoWrapper, #cartBoxListWrapper, #ezPageBoxList, #cartBoxListWrapper ul, #ezPageBoxList ul, #mainWrapper, #popupAdditionalImage, #popupImage {

    margin: auto;

    padding: 0em;

    }



    #navColumnOneWrapper, #navColumnTwoWrapper, #mainWrapper {

    WIDTH: auto;
    POSITION: absolute;
    background-position: center center;
    margin-top: 0px;
    margin-right: auto;
    margin-bottom: 0px;
    margin-left: auto;
    padding-top: 0px;
    padding-right: auto;
    padding-bottom: 0px;

    }

  3. #3
    Join Date
    Mar 2011
    Posts
    19
    Plugin Contributions
    0

    Default Re: Can Not Center Wesite with margin: auto;

    I really appreciate your help so much. I think your the first person to answer one of my questions!!!.

    I saw what you meant and i deleted the two #mainwrapper but it is still not centered. Im not sure why its not working.

    If anyone else has suggestions my site and style sheet is above on first post.

  4. #4
    Join Date
    Mar 2011
    Posts
    19
    Plugin Contributions
    0

    Default Re: Can Not Center Wesite with margin: auto;

    Also some of my Text is really small since i deleted the two #mainwrapper i.e. where it says search and manufacturer i know it is inheriting from somewhere i j ust dont know where

  5. #5
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: Can Not Center Wesite with margin: auto;

    Quote Originally Posted by cageman555 View Post
    Also some of my Text is really small since i deleted the two #mainwrapper i.e. where it says search and manufacturer i know it is inheriting from somewhere i j ust dont know where
    Try removing the highlighted portion from the following declaration

    #mainWrapper {

    margin: auto;

    background-color: #ffffff;

    text-align: left;


    /* position:absolute;*/

    vertical-align: top;

    border-right: 1px solid #9a9a9a;


    }

  6. #6
    Join Date
    Mar 2011
    Posts
    19
    Plugin Contributions
    0

    Default Re: Can Not Center Wesite with margin: auto;

    when i comment out position: absolute; it moves the right sideboxes out of the wrapper just a little bit (atleast on my screen) and now my wrapper is 100% of the page i want the wrapper to be centered with a background

  7. #7
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: Can Not Center Wesite with margin: auto;

    Quote Originally Posted by cageman555 View Post
    when i comment out position: absolute; it moves the right sideboxes out of the wrapper just a little bit (atleast on my screen) and now my wrapper is 100% of the page i want the wrapper to be centered with a background
    set the width in stylesheet.css as indicated.

    #mainWrapper {

    margin:auto;

    background-color: #ffffff;

    text-align: left;


    /* position:absolute; */

    vertical-align: top;

    width:980px;


    }

  8. #8
    Join Date
    Mar 2011
    Posts
    19
    Plugin Contributions
    0

    Default Re: Can Not Center Wesite with margin: auto;

    thank you so much!!!!! i have been receiving so much pressure getting this site done know i just have to style it. You are the only person who has helped me. Is there any way you can check out my other post on how to clone the manufacturer sidebox and turn it into a center box only on the main page. I want the manufacturers images to display horizontally Like New Products For "Month".

    Ive managed to clone the original manufacturer sidebox that came with zen cart and place it below the "New Products for Month"

    How do i buy you a cup of coffee!!!!!!

  9. #9
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: Can Not Center Wesite with margin: auto;

    Quote Originally Posted by cageman555 View Post
    thank you so much!!!!! i have been receiving so much pressure getting this site done know i just have to style it. You are the only person who has helped me. Is there any way you can check out my other post on how to clone the manufacturer sidebox and turn it into a center box only on the main page. I want the manufacturers images to display horizontally Like New Products For "Month".

    Ive managed to clone the original manufacturer sidebox that came with zen cart and place it below the "New Products for Month"

    How do i buy you a cup of coffee!!!!!!
    not sure if this will help but maybe you could clone this add-on to achieve what you want.

    www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=941

    click the link to my site in my signature.

  10. #10
    Join Date
    Mar 2011
    Posts
    19
    Plugin Contributions
    0

    Default Re: Can Not Center Wesite with margin: auto;

    ya that is what i put in last nite it has alot more files compared to to the original so i am going to attempt to clone it. the problem i had with the first one was that when i placed the side box in the center it was still the same width . I want the width the match the center box header.

    And when i changed the width it would change the width on the side and the middle since they are a clone.

    How does the header where it says "New Products for Month" (centerbox) expand across the center column. The width of it i mean?

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. Auto export shipping information to fulfillment center?
    By mattie3000 in forum Addon Shipping Modules
    Replies: 3
    Last Post: 13 Jan 2010, 09:35 PM
  2. sidebox margin not flush with right side of page only in ie
    By welchyboy in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 20 Sep 2008, 10:08 PM
  3. Can we have Auto Fill with UPS and USPS?
    By ncmx1 in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 5 Nov 2007, 06:20 AM
  4. pesky margin-top and center issues
    By artcop in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 8 Apr 2007, 04:12 AM
  5. Center Box Sub heading margin
    By kathsta in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 17 Nov 2006, 01:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg