Align div in center

Discussion in 'CSS' started by ken.sweet, Jan 3, 2011.

  1. #1
    http://tinyurl.com/269wrcn
    In the above link, i tried putting the background fixed and in the center. Now the blue background and inside part in not coming in center in all resolutions. Can anyone help?
     
    ken.sweet, Jan 3, 2011 IP
  2. Zeh.

    Zeh. Peon

    Messages:
    57
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You mean vertical centering?
     
    Zeh., Jan 4, 2011 IP
  3. ken.sweet

    ken.sweet Active Member

    Messages:
    683
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    93
    #3
    yes vertical centering, but now i got it. I had given possition: absolute; i put left:0;
     
    ken.sweet, Jan 4, 2011 IP
  4. radiant_luv

    radiant_luv Peon

    Messages:
    1,327
    Likes Received:
    34
    Best Answers:
    1
    Trophy Points:
    0
    #4
    I haven't been able to check the URL. Did you verify with different resolution?
     
    radiant_luv, Jan 4, 2011 IP
  5. ken.sweet

    ken.sweet Active Member

    Messages:
    683
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    93
    #5
    yes,its working now.
     
    ken.sweet, Jan 4, 2011 IP
  6. php.freak

    php.freak Well-Known Member

    Messages:
    185
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    101
    #6
    we face such kinda problem when we not put float property of css.....what you think
     
    php.freak, Jan 5, 2011 IP
  7. radiant_luv

    radiant_luv Peon

    Messages:
    1,327
    Likes Received:
    34
    Best Answers:
    1
    Trophy Points:
    0
    #7
    Nope, it has nothing to do with float.
     
    radiant_luv, Jan 5, 2011 IP
  8. ken.sweet

    ken.sweet Active Member

    Messages:
    683
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    93
    #8
    yes right. Float didnt work in this case.
     
    ken.sweet, Jan 5, 2011 IP
  9. radiant_luv

    radiant_luv Peon

    Messages:
    1,327
    Likes Received:
    34
    Best Answers:
    1
    Trophy Points:
    0
    #9
    what you've done with absolute positiong, you will not be able to achieve vertical centering. Check your page in higher resolution than resolution you are checking now.
     
    radiant_luv, Jan 5, 2011 IP
  10. ken.sweet

    ken.sweet Active Member

    Messages:
    683
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    93
    #10
    Thanks guys, problem is perfectly solved.
     
    ken.sweet, Jan 5, 2011 IP
  11. allwebactivities

    allwebactivities Peon

    Messages:
    35
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    k that's gr8
     
    allwebactivities, Jan 22, 2011 IP