Fluid column in row of floats?

Discussion in 'CSS' started by smitts, Oct 29, 2006.

  1. #1
    I have a "row" type div that I need to be like the following:

    DIV(Fixed)|DIV(30%)|DIV(Fixed)|DIV(Fluid)|DIV(Fixed)

    I have tried coding this with a bunch of divs floated left, but I cannot get the fluid div to take up the space between the two fixed divs. I can get the space there if I float the last div right, but the fluid div still doesn't take up the correct space.

    The 30% DIV I could set to a fixed width if it was absolutely necessary, but if possible I'd like to keep it fluid.

    I'm not sure using the float is even the right method for this, any help would be greatly appreciated!
     
    smitts, Oct 29, 2006 IP
  2. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #2
    fixed, float left
    30%, float left
    fixed, float left
    fixed, float right
    fluid, static

    Source in that order and all should be well. The static, fluid column should be the shortest, since you're mixing fixed with percentage widths.

    cheers,

    gary
     
    kk5st, Oct 29, 2006 IP
    smitts likes this.
  3. smitts

    smitts Peon

    Messages:
    177
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Worked perfectly, I was trying to put the fluid static column before the float right. I had actually tried in this order, but at that time, I had a width specified for the fluid, so it still didn't work as I wanted.

    Anyway, thank you for the help, it is greatly appreciated!
     
    smitts, Oct 30, 2006 IP