width problems: code section inside panel section

I am trying to create a document with two columns: the first one being code and the second being a description of that code.

The basic setup is this:

h1. Code column
// code goes here
h1. Explanation column
_something useful goes here_

The problem is that if the text in the {code} section is wider than the column, it will cause the column to take up size accordingly instead of keeping the block at 50%.

Has anyone else run into this issue and/or does anyone have a workaround?

1 answer

1 accepted

0 vote
David Simpson Community Champion Jun 22, 2011

The problem is that by default, table cells expand to the size of their contents.

This kind of thing should do the trick:

<style> table.sectionMacro { table-layout: fixed; } </style>
You'd need to add it to the custom stylesheet -- either in Space Admin or Confluence Admin.

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
Published 8 hours ago in Confluence

Think you know shares vs. @mentions in Confluence? Take this collab quiz.

To anyone who doubts that Atlassians are a little too obsessed with collaboration, and tools related thereto, let me describe a recent discussion we had (which took place on our internal Confluence, ...

85 views 2 4
Read article

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