Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

5 votes
Answer 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

Your definition of "free" differs from mine: https://marketplace.atlassian.com/apps/247/content-formatting-macros-for-confluence?hosting=cloud&tab=pricing

Supporting a 'div' in wiki markup seems like a pretty baseline thing, hard to understand why you can only get it in a paid add-on...

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

Addendum:  I find that my approach on Oct. 27 was affecting all of the panels in my space, and I just want to apply the scrollable panel to certain pages.  Here is one way you can try to just keep the panel in your current page scrollable. 

Please see https://www.screencast.com/t/DuYd76wyRf.  As you can see, I add a HTML macro to my page.  Inside the macro is 3 lines of CSS code.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

Announcing Team Calendars in Confluence Data Center

Hi Community! We're thrilled to share that Team Calendars for Confluence is now a built-in feature for Confluence Data Center releases 7.11 and beyond.  A long time favorite,  Team Cale...

59 views 0 3
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you