samedi 25 avril 2015

Adjust parent DIV height to inner content (RSS feeds)


I'm embedding a RSS feed into my html site using the Google Feed API. I tried to make the parent-DIV adjust its height with jquery:

function setHeightParent() {
                $("#Parent").height($("#feed").height() + 200);
                }

This results in a parent-DIV with a height of 200 px. I think the height is calculated before the "feed" div has any content therefore no height.. What am I doing wrong, how can I make it take the height of the final "feed" div?


Aucun commentaire:

Enregistrer un commentaire