0

I'm playing around with Drupal, and I am coding a subtheme of Zen. Now I'm stuck at something, I want to achieve a full length sidebar when the content isn't large enough, so that the sidebar takes the height of the body, when the content is scrollable, that's no problem, but when it's not scrollable I want the sidebar full height I added this line of jQuery but it doesn't seem to work, I have set the css of body to height:100% :

> $(document).ready( function() {
>         $('.region-sidebar-first').height($('body').height());
>     });
  • The wya this is written makes it seem like this is not a Drupal problem. can you explain what is going on that makes you think it is Drupal? FWIW, your jquery syntax looks ok.. throw an "alert()" in there and see if it fires. – user5482 Jan 27 '15 at 18:25
  • Unless you have a variable somewhere that sets $ = jQuery; then you need to replace $ with jQuery or wrap it in a function that passes in jQuery – chadpeppers Jan 27 '15 at 20:08
0

I think your problem can easily be solved using the Equal Heights jQuery module. As the name suggests, this module provides a jQuery plugin that forces elements having the same CSS class name to have the same height.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.