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
    Mar 2014
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Centering Alignment Columns

    I'm having trouble centering four rows. What I've done is define a margin in css as .left and .right. They both work in actually centering the four rows and the code below it, but on the forum I'm on that's all it does. What I mean by that is everything is centered but not centered in the code, but not actually centered on the forum (it's floating to the left).

    Also a floating main menu nav bar we have on the right (not part of this code) is pushed down below the columns.

    I've been trying to fix this for the past few hours or so with no luck. Any help? I really, really appreciate it. Thanks.

    code I'm using to center:

    Code:
    }
    .left {
    margin: 0 auto;
    text-align:center;
    width:1024px;
    min-width:auto;
    overflow: hidden;
    }
    Demo link: CSSDesk - DDJax

    Picture of the problem: http://i1335.photobucket.com/albums/...ps89a1c5e9.png

    -It maybe be hard to see in the picture but the very left column is at the edge of the html page, the forum background is next to it.

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello Ducky_,
    I'm not seeing your problem. Your container, .left, is 1024px wide and centered just like you've styled it to be.
    If you are trying to put a menu beside those 4 columns, you will need .left to be wider.

    Some errors that could be fixed.
    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

  • #3
    New to the CF scene
    Join Date
    Mar 2014
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I think the main problem at this point is that;

    1. For some reason the code is interfering with a nav bar that's already existing.

    2. While everything is centered on the column itself, it's not centered in the middle of the html page. It's floating to the left...

    I can't figure out how to fix the above.

  • #4
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Quote Originally Posted by Ducky_ View Post

    2. While everything is centered on the column itself, it's not centered in the middle of the html page. It's floating to the left...
    The code you provided centers fine. You don't show us the code for any menu, your screencap doesn't tell us anything, so I can't guess how that will act. Give us a link to the test site so we can see it in action.
    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


  •  

    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
    •