0
votes

How is it possible to have a fluid div change it's height according to the content in css alone, or do I have to do it in PHP?

The reason why is because I am making a theme for Drupal and the content will change for each page of the theme.

For example, the middle content div doesn't have a set height, but depending on the article or page length specified in the Drupal back end, the content div will change accordingly.

Amar

1
Mabe <div style="clear:both"></div> after the content div will help you? - er-v
What height would I set in the first place for the content div? - Amar H-V
Isn't it stratched by content? - er-v
If you have a fluid content div in non fluid div, then you must add clear both div after the fluid div, so non fluid div have same height as inner fluid div. - er-v
css-tricks.com/all-about-floats look Greate collapse section - er-v

1 Answers

1
votes

If you have a fluid content div in non fluid div, then you must add clear both div after the fluid div, so non fluid div have same height as inner fluid div

<div style="clear:both"></div>