I have a div and a table side by side each other on my layout. I would like the div to have its height based on the td, but not the other way around. What is the best strategy to go about doing this? Thanks.
Since you want it to only go one-way, you will likely need to use Javascript. Although sometimes you can fake it with CSS. If the div is actually a parent of the table, the growing and shrinking table could make the div grow and shrink. <div> <table> </table> </div> Where the div can be faked to LOOK like it's next to the table. Pushing the table way to the left for example, the leftover space on the right side could represent your div. div---------------------------------------------------- table ----------------| | | | your other | | | side | |_____________________| | |______________________________________________________| Code (markup): I suck at those, but anyway... The div could grow without making the table grow. You could also have another div on the other side, so a sibling to the table. <div> <table/> <innerdiv/> </div> with table floated left and innderdiv floated right... You can't use display: table here since that would make both the div and table affect each other, and you said you didn't want that.