how can I get a horizontal or vertical scroll bar for the panel?

This question is in reference to Atlassian Documentation: Panel Macro

how can I get a horizontal or vertical scroll bar for the panel?

2 answers

1 accepted

The first problem is that the Panel macro scales out to accommodate the contents, so you have to limit the size of the panel:

  1. Add a Div macro
  2. Set the Styles field:

    width: npx; height: npx

     (where n=whatever size you want the panel to be)

  3. Add a Panel macro to the body of the Div macro

Now that the Panel is constrained, you can add a constrained box within it and tell it to use scrollbars when necessary:

  1. Add a Div macro to the body of the Panel macro
  2. Set the Styles field:

    width: npx; height: npx; overflow: auto

    (where the width is about 12px less than the panel div width)

  3. Add content to the Div macro within the Panel macro


NOTE: If your content is just text, there will only be a vertical scrollbar, but any kind media will have both vertical and horizontal scrollbars.

I did not find Div macro. Where can I find Div macro?

It's part of the free tools in Adaptavist's Content Formatting For Confluence.

 

This works but then messes up the final page. div inside a panel inside a div

Hi, my problem is not exactly the same as Thomas Wilborn's;  mine is to "keep element in view while scrolling".  In particular, I want to make my Table of Contents respond to scrolling events.  If you are interested, please read on:

  1. I found a piece of JQuery code here: http://www.wduffy.co.uk/blog/keep-element-in-view-while-scrolling-using-jquery/
  2. I applied the JQuery code to my Confluence (6.1) like this: https://www.screencast.com/t/qVWu8xXz

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

370 views 20 10
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you