Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Aug 2010
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Can't center content.

    Hello everyone,

    I'm a designer and not precisely a code savy, I'm working on my site and I just uploaded a "coming soon" page to my hosting, the original image on my pc is centered, all divs have the "center" and "margin: auto" in the css and yet when it's up it goes to the left.

    Some help, please.

    This is the link, please treat it with discretion since the page is not oficially up yet.

    www.theengarpresence.com

  • #2
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,957
    Thanks
    9
    Thanked 727 Times in 721 Posts
    The problem is on your body tag. Your javascript is applying an inline style. In Firebug I see:

    Code:
    <body style="margin:0px;padding:0">
    which is overriding your css style.

    Anticipating that the javascript is from your hosting ads and not editable, then I'd suggest removing the width from body entirely, and adding another div which wraps everything else, and has width:630px, and margin:0 auto. Then everything should centre fine.

    EDIT: Not sure whether you're trying to centre the text as well - if so then you have:

    Code:
    div.contenido {
    font-size:18pt;
    font-weight:bold;
    letter-spacing:0.1px;
    margin:auto;
    padding-top:10pt;
    text-align:left;
    }
    which is preventing this.
    Last edited by SB65; 08-09-2010 at 08:58 PM.

  • Users who have thanked SB65 for this post:

    engar (08-09-2010)

  • #3
    New to the CF scene
    Join Date
    Aug 2010
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts
    That did it, thanks man

    You are a magician.

    Regards.


  •  

    Posting Permissions

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