Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
Confluence
/
Page-High Resizable Containers

Page-High Resizable Containers

Oct 21, 2015

In certain projects that involved a presentation like webpage with storytelling elements, you need containers that always keep the same height as the window itself.
This effect can be achieved using "page-high resizable containers".

The Javascript library jQuery let's us to listen to the "resize" event of the browser window and calculate the height of the containers:

// execute code after the page has been loaded
$(function(){
  // the resize function
  function resize() {
    // set a new height for all elements with the class 'page'
    $('.page').css('height', $(window).height());
  }
  
  // register the event handler
  $(window).on('resize', resize);
 
  // calculate initial height
  resize();
});

 

 

, multiple selections available,
For you

Web Development
  • Web Development
    Web Development
     This trigger is hidden
Results will update as you type.
  • A basic Barchart
  • Absolute Positioning
  • Code Editors
  • CSS
  • CSS Animations
  • CSV Transformation with node.js
  • d3.js
  • Desktop Source Compilers
  • Homebrew
  • Hosting Services
  • HTML CSS Javascript Resources
  • Interactive Visualization
  • jQuery
  • Mobile Optimization
  • node.js
  • Page-High Resizable Containers
  • Scrollable Visualization
  • Simple Layout Techniques
  • SVG
  • SVG Visualization
  • Terminal
  • UI Prototyping Tools
  • Version Control with GitHub

{"serverDuration": 54, "requestCorrelationId": "664a3dd9a21942d49739eaee9ceabd27"}