Absolute Positioning Inside A Div?

Discussion in 'CSS' started by bobby9101, Mar 13, 2007.

  1. #1
    How do I put 4 elements, one in each corner of the div?
    I can't use regular absolute, because the div isn't the same always.
    And relative, can be tricky.
     
    bobby9101, Mar 13, 2007 IP
  2. nwk

    nwk Well-Known Member

    Messages:
    385
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    158
    #2
    For the upper two you just float them left and right and for the lower two put them inside another div which has the same width as the main div. Position this div to the bottom of the main div. Then inside it float the lower two elements to left and right.
     
    nwk, Mar 13, 2007 IP
  3. frankcow

    frankcow Well-Known Member

    Messages:
    4,859
    Likes Received:
    265
    Best Answers:
    0
    Trophy Points:
    180
    #3
    frankcow, Mar 13, 2007 IP
  4. bacanze

    bacanze Peon

    Messages:
    2,419
    Likes Received:
    127
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Apply a class to each element.
     
    bacanze, Mar 13, 2007 IP
  5. bobby9101

    bobby9101 Peon

    Messages:
    3,292
    Likes Received:
    134
    Best Answers:
    0
    Trophy Points:
    0
    #5
    OMG, I never thought of that... not :D
     
    bobby9101, Mar 13, 2007 IP