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 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Can Someone Please Help Me out!! Anyone:D

    I am a so bad a coding. I know just a little and the one thing that has been hunting me as got me big time. For the love of god I can't seem to center my site. At all! When I get it centered on one computer and I go to the next, its not. Can someone please help me?? I would love it!!!

  • #2
    Regular Coder
    Join Date
    Dec 2010
    Posts
    424
    Thanks
    22
    Thanked 56 Times in 56 Posts
    Hey, i would need to see your code.
    But you just need to do

    Code:
    margin:0 auto;
    on the the div wrapping your page / content

    can you post like or code
    thanks

  • #3
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,739
    Thanks
    22
    Thanked 1,837 Times in 1,821 Posts
    Hello Webbabe,
    To center an element you need three things:
    1. a valid DocType
    2. an element with a width
    3. that elements right/left margins set to auto
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #4
    New Coder
    Join Date
    Oct 2012
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You need to ensure that the margin of body element must be 0 or auto.


  •  

    Tags for this Thread

    Posting Permissions

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