Alignment trouble

Discussion in 'CSS' started by awesty, May 22, 2007.

  1. #1
    I am having some trouble with CSS. I have a div, which is 80% wide and I have 3 divs inside it. I want one, which is 23px, it stay on the left of the div it is in. I have another which is also 23px and I want it to stay on the right side of the div. Then there is one in the middle which I want to fill the gap between the divs on the left and right.

    Can anyone help?

    Thanks. :eek:
     
    awesty, May 22, 2007 IP
  2. Katy

    Katy Moderator Staff

    Messages:
    3,490
    Likes Received:
    513
    Best Answers:
    7
    Trophy Points:
    355
    #2
    Use the float property. ( float: left; or float: right; )
     
    Katy, May 22, 2007 IP
  3. Leox Adir

    Leox Adir Guest

    Messages:
    237
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #3
    float: left;
    clear: left;

    float: right;
    clear: right;
     
    Leox Adir, May 22, 2007 IP
  4. awesty

    awesty Active Member

    Messages:
    247
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    58
    #4
    They both work if I take the middle one out. But if I put the middle one it the div on the right moves down onto the next line.

    EDIT: Never mind. I have figured it out.
     
    awesty, May 22, 2007 IP