Problems with $(''). height();

Asked

Viewed 120 times

0

  • The code is correct, see example in Jsfiddle. Maybe you’re forgetting to include any more information. If possible, work with the real problem instead of "#left" and "#right" use the classes/ids you’re manipulating on the site.

  • 1

    If you want to keep these blocks the same height you have to run that line of code every time one of them changes size/height. You’ve tried that?

  • 2

    I’ll skip your question a little. If I understand correctly, your problem is with the layout. The ideal place to solve layout problems is in CSS without involving Javascript. Your site layout is very close to a two columns classic. I would recommend to search for articles on this layout and adapt to your problem. That article list some layout examples with CSS.

  • @Sergiopereira but partner, the height is all buggy, it is easier mt it leave a malleable height with JS

  • @Andreyhartung I understand your point of view, but I see it differently. If it were as easy as it sounds, we wouldn’t be here looking for answers to this problem. My suggestion was just to consider a CSS-only solution because this is basically a problem already solved and with many examples out there. I’ve never had long-term luck with JS solutions for this type of problem.

1 answer

1

Browser other questions tagged

You are not signed in. Login or sign up in order to post.