Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

width problems: code section inside panel section

Thomas Ehardt
Contributor
June 22, 2011

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:

{section}
{column:width=50%}
{panel}
h1. Code column
{code}
// code goes here
{code}
{panel}
{column}
{column:width=50%}
{panel}
h1. Explanation column
_something useful goes here_
{panel}
{column}
{section}

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 votes
Answer accepted
David at David Simpson Apps
Atlassian Partner
June 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
TAGS
atlassian, likes for trees, atlassian community, social impact, tree planting campaign, community kudos, atlassian giving, environmental impact, sustainability, likes for good, atlassian social responsibility, community challenge

Make every click count—help us plant 50,000 trees! 🌳

Want to make your everyday Community actions directly contribute to reforestation? The Atlassian Community can achieve this goal by liking a post, attending an ACE, sending your peers kudos, and so much more!

Help us plant more trees
AUG Leaders

Atlassian Community Events