WEB Verticle Centering

Discussion in 'OT Technology' started by Coaxsist, Apr 7, 2009.

  1. Coaxsist

    Coaxsist Re-create... Innovate

    Joined:
    Feb 11, 2008
    Messages:
    1,032
    Likes Received:
    0
    Ex: http://martininteriordesign.com/projects.html

    I've tried just putting vertical-align in my css. I've also tried margins and padding (neg- top values, pos+) but none of those work. I really don't want to put a table there, but if I have to I will... Thanks. :x:
     
  2. o2

    o2 Witty Title Here OT Supporter

    Joined:
    Oct 4, 2005
    Messages:
    16,099
    Likes Received:
    11
    Location:
    Toronto
    Make a table with a valign tag.

    Problem solved.
     
  3. brds

    brds OT Supporter

    Joined:
    Jun 26, 2006
    Messages:
    17,642
    Likes Received:
    13
    Location:
    Atlanta
    I just do something like this:

    Used it on THIS SITE most recently.


    Edit: wait, are you trying to center a column so there's the same amount of space on the left and right side, or on the top and bottom?
     
  4. o2

    o2 Witty Title Here OT Supporter

    Joined:
    Oct 4, 2005
    Messages:
    16,099
    Likes Received:
    11
    Location:
    Toronto
    vertical = top/bottom

    Your example could be done like
    <div style="width:800px; margin: 0px auto;">lol</div>
     
  5. brds

    brds OT Supporter

    Joined:
    Jun 26, 2006
    Messages:
    17,642
    Likes Received:
    13
    Location:
    Atlanta
    Yeah, i thought he meant the left/right spacing.


    <div style="width:800px; margin: 0px auto;">lol</div> doesn't work in IE.
     
  6. o2

    o2 Witty Title Here OT Supporter

    Joined:
    Oct 4, 2005
    Messages:
    16,099
    Likes Received:
    11
    Location:
    Toronto
    yah it does. Im using it on all my sites
     
  7. Coaxsist

    Coaxsist Re-create... Innovate

    Joined:
    Feb 11, 2008
    Messages:
    1,032
    Likes Received:
    0
    Nice. Thanks all, I'll give em a try.
     
  8. brds

    brds OT Supporter

    Joined:
    Jun 26, 2006
    Messages:
    17,642
    Likes Received:
    13
    Location:
    Atlanta
    Here's the code and it running in my IE
    [​IMG]
     
  9. o2

    o2 Witty Title Here OT Supporter

    Joined:
    Oct 4, 2005
    Messages:
    16,099
    Likes Received:
    11
    Location:
    Toronto
    I dunno. Works here for me:

    http://www.lmylife.com/

    You prolly need to assign 100% to the body attribute as well
     
  10. brds

    brds OT Supporter

    Joined:
    Jun 26, 2006
    Messages:
    17,642
    Likes Received:
    13
    Location:
    Atlanta
    :dunno:, i played around with that... couldn't get it. Your way seems easier if i could get it to work (and by that i mean less typing...)
     
  11. Coaxsist

    Coaxsist Re-create... Innovate

    Joined:
    Feb 11, 2008
    Messages:
    1,032
    Likes Received:
    0
    o2:

    is lmylife.com yours? if it is, I may have come onto something of a bug.

    I clicked on one of the anecdotes, which brought me to a page with comments for that particular short story. On that page, the navigation tabs at the top right, didnt take me anywhere.

    Just bringin it up. :dunno:

    edit: completeley ignore the above post.
     
    Last edited: Apr 8, 2009
  12. o2

    o2 Witty Title Here OT Supporter

    Joined:
    Oct 4, 2005
    Messages:
    16,099
    Likes Received:
    11
    Location:
    Toronto
    Thank you sir. :bowdown:
     
  13. Coaxsist

    Coaxsist Re-create... Innovate

    Joined:
    Feb 11, 2008
    Messages:
    1,032
    Likes Received:
    0
    Accurate bug?
     
  14. o2

    o2 Witty Title Here OT Supporter

    Joined:
    Oct 4, 2005
    Messages:
    16,099
    Likes Received:
    11
    Location:
    Toronto
    indeed. all patched up. :cool:
     
  15. Coaxsist

    Coaxsist Re-create... Innovate

    Joined:
    Feb 11, 2008
    Messages:
    1,032
    Likes Received:
    0
    Niiiice
     

Share This Page