gib65
08-11-2012, 05:50 AM
Hello,
How can I tell a div, in CSS, to take up the rest of the space that's left over from another div to its left. I mean, I have one div floating on the left and it's size is determine by the jpg image that's filling it up. Then, the div to its right is floating left and its size is also determined by its contents (text in this case). I would like to set its width, in CSS, to be whatever's left in its parent div (also the parent of the div to the left) after the first div took up space on the left side.
I'm trying to force it to stick with the remaining width, and to force it to grow in height if it needs more room to display its contents. The problem now is that if its contents are too large, the div wraps around to the next line (i.e. it appears under the first div instead of to its right). I'm hoping that setting its width to be fixed at the remainder of its parent's available space, it won't do this and will grow its height down instead if it needs extra space for its contents.
How can I do this?
How can I tell a div, in CSS, to take up the rest of the space that's left over from another div to its left. I mean, I have one div floating on the left and it's size is determine by the jpg image that's filling it up. Then, the div to its right is floating left and its size is also determined by its contents (text in this case). I would like to set its width, in CSS, to be whatever's left in its parent div (also the parent of the div to the left) after the first div took up space on the left side.
I'm trying to force it to stick with the remaining width, and to force it to grow in height if it needs more room to display its contents. The problem now is that if its contents are too large, the div wraps around to the next line (i.e. it appears under the first div instead of to its right). I'm hoping that setting its width to be fixed at the remainder of its parent's available space, it won't do this and will grow its height down instead if it needs extra space for its contents.
How can I do this?