0
Welcome Guest! Login
0 items Join Now

rt Gantry rt-sidebar-a height problem

    • Pelle P's Avatar
    • Pelle P
    • Sr. Rocketeer
    • Posts: 140
    • Thanks: 0
    • Pelle Pedersen

    rt Gantry rt-sidebar-a height problem

    Posted 13 years 6 months ago
    • Pelle P's Avatar
    • Pelle P
    • Sr. Rocketeer
    • Posts: 140
    • Thanks: 0
    • Pelle Pedersen

    Re: rt Gantry rt-sidebar-a height problem

    Posted 13 years 6 months ago
    • Any ideas or hints?

      Regards
      Pelle
    • Cliff Pfeifer's Avatar
    • Cliff Pfeifer
    • Preeminent Rocketeer
    • Posts: 8444
    • Thanks: 20
    • Website Developer

    Re: rt Gantry rt-sidebar-a height problem

    Posted 13 years 5 months ago
    • Just seeing your post. If you want to avoid Javascript, an easy way to do it is to add a height declaration to your CSS like so:
      #rt-sidebar-a{height:400px;}

      Add to your style1.css, put whatever number you like for the height. It will be static, but it achieves the effect you're after. Hope this helps.
    • The difficult we do immediately, the impossible takes a little longer.
    • Pelle P's Avatar
    • Pelle P
    • Sr. Rocketeer
    • Posts: 140
    • Thanks: 0
    • Pelle Pedersen

    Re: rt Gantry rt-sidebar-a height problem

    Posted 13 years 5 months ago
    • Thanks Cliff

      I already use this method (on my testpage). But I would like the sidebar to go from top to bottom. I want the sidebar to follow the content. Is this somehow possible?

      If I go the Java way...

      Do you have any idea how to implement the:
      "MooTools Equal Heights Plugin: Equalizer" in a Joomla template?
      davidwalsh.name/js/equalizer

      Best Regards

      Pelle
    • Cliff Pfeifer's Avatar
    • Cliff Pfeifer
    • Preeminent Rocketeer
    • Posts: 8444
    • Thanks: 20
    • Website Developer

    Re: rt Gantry rt-sidebar-a height problem

    Posted 13 years 5 months ago
    • Unfortunately, the Javascript solution like the one mentioned in the post you linked to is the only way to make that happen. The javascript checks to see how tall your content is and then applies that height to your sidebar. HTML / CSS is very finicky when it comes to spacing and unless both sides have the same height property or the same amount of content they won't match up. It's a challenge every web designer comes across at some point. Hope that helps.
    • The difficult we do immediately, the impossible takes a little longer.
    • Pelle P's Avatar
    • Pelle P
    • Sr. Rocketeer
    • Posts: 140
    • Thanks: 0
    • Pelle Pedersen

    Re: rt Gantry rt-sidebar-a height problem

    Posted 13 years 5 months ago
    • Do you have any idea how to implement the script? The demo on davidwalsh.name/js/equalizer isn't clear to me.

      Can I put the script directly in index.php?

      Regards
      Pelle
    • Cliff Pfeifer's Avatar
    • Cliff Pfeifer
    • Preeminent Rocketeer
    • Posts: 8444
    • Thanks: 20
    • Website Developer

    Re: rt Gantry rt-sidebar-a height problem

    Posted 13 years 5 months ago
    • Yes, put it in the head section of the template index.php. Let me know if that works for you.
    • The difficult we do immediately, the impossible takes a little longer.
    • Pelle P's Avatar
    • Pelle P
    • Sr. Rocketeer
    • Posts: 140
    • Thanks: 0
    • Pelle Pedersen

    Re: rt Gantry rt-sidebar-a height problem

    Posted 13 years 5 months ago
    • Great. I will try a little later. It sounds to easy :D

      Thanks until now.

      Regards
      Pelle
    • Cliff Pfeifer's Avatar
    • Cliff Pfeifer
    • Preeminent Rocketeer
    • Posts: 8444
    • Thanks: 20
    • Website Developer

    Re: rt Gantry rt-sidebar-a height problem

    Posted 13 years 5 months ago
    • Cool, let me know if you have problems, I know some of the other moderators have done this and can help you.
    • The difficult we do immediately, the impossible takes a little longer.
    • Pelle P's Avatar
    • Pelle P
    • Sr. Rocketeer
    • Posts: 140
    • Thanks: 0
    • Pelle Pedersen

    Re: rt Gantry rt-sidebar-a height problem

    Posted 13 years 5 months ago
    • No luck.

      I placed the script just before </head>. But there is no change. And no errors...

      Do I miss a bit of code? Are there other things I have to add?

      <script type="text/javascript" src="mootools-1.2.4.js"></script>
      <script type="text/javascript">
      var Equalizer = new Class({
      initialize: function(elements) {
      this.elements = $$(elements);
      },
      equalize: function(hw) {
      if(!hw) { hw = 'height'; }
      var max = 0,
      prop = (typeof document.body.style.maxHeight != 'undefined' ? 'min-' : '') + hw; //ie6 ftl
      offset = 'offset' + hw.capitalize();
      this.elements.each(function(element,i) {
      var calc = element[offset];
      if(calc > max) { max = calc; }
      },this);
      this.elements.each(function(element,i) {
      element.setStyle(prop,max - (element[offset] - element.getStyle(hw).toInt()));
      });
      return max;
      }
      });
      </script>

      Best regards
      Pelle

Time to create page: 0.059 seconds