CSS Positioning Help

Discussion in 'CSS' started by random0, Oct 10, 2008.

  1. #1
    I use

    position:absolute;
    top: 120px;
    left:24%;
    
    Code (markup):
    It works fine, I have set my div as i wanted but when you resize your browser, div moves around too(positions itself with those values within the resized browser). Is there a way for me to stick that div at that place. I don't want it to move as you resize your browser.

    I chose position:absolute because it's really easy for me to put whatever i want wherever i want, but everything gets messed up when you resize your browser. Any alternative ways or ideas?
     
    random0, Oct 10, 2008 IP
  2. rikun

    rikun Peon

    Messages:
    85
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Don't use the % for the left if you don't want it to move when you resize. Just use pixels like you did for top.
     
    rikun, Oct 10, 2008 IP