SID-00129: Two columns with headers
| Status: |
Answered |
TWiki version: |
|
Perl version: |
|
| Category: |
CategoryRendering |
Server OS: |
|
Last update: |
11 years ago |
Hi, I am trying to make two columns on my twiki page. But i need to use the headers inside both of the columns for different catagories. Is there anyway to do this?
--
FrankColburn - 23 Feb 2009
Discussion and Answer
Use CSS or tables. Here is a table example ("view raw" to see how this works) :
Heading One
Content "one" here. The quick brown fox jumps over a lazy dog. The quick brown fox jumps over a lazy dog.
|
Heading Two
Content "two" here. The quick brown fox jumps over a lazy dog. The quick brown fox jumps over a lazy dog.
The quick brown fox jumps over a lazy dog. The quick brown fox jumps over a lazy dog.
The quick brown fox jumps over a lazy dog. The quick brown fox jumps over a lazy dog.
The quick brown fox jumps over a lazy dog. The quick brown fox jumps over a lazy dog.
The quick brown fox jumps over a lazy dog. The quick brown fox jumps over a lazy dog.
The quick brown fox jumps over a lazy dog. The quick brown fox jumps over a lazy dog.
|
--
PeterThoeny - 23 Feb 2009
I have to create the same thing, but my two texts are really shorter than that. Which gives me, the second column way too closer to the first one. How do i get the second column at the place I want on the page ?
Thank you
--
Mathieu Crins - 2014-01-17
I changed above example to use 50% column width. Do a "raw view" to see how.
I also enclosed the table tags in sticky tags to protect them from the WYSIWYG editor.
You could hide the tags in preferences settings you define on site level or web level, for use as in:
%COLUMN_LEFT%
left column content
%COLUMN_RIGHT%
right column content
%COLUMN_END%
--
Peter Thoeny - 2014-01-17
Thank you Peter
--
Mathieu Crins - 2014-01-20
Hi,
I managed to achieve two column format using the table tag as shown above. However, as a newbie, I was not able to decode the "hiding of the tags" into variables at the site level. Do I understand it correctly that I should define twiki variables like
-
- Set COLUMN_LEFT = ... and here the star table tag ...?
and then let them expand at the proper place in the topic page? How should I define the COLUMN_LEFT variable so that the tags are assigned
properly - I have to escape the < and > characters so that they are not used for starting a table at the assignement line.
So I tried to use the %ENTITY{ ... }% to encode the tags. However, when expanding the variable later on within the topic, the encoded text is just copied into the page and no formatting is done.
This is probably very basic and simple question. Thank you a lot for any kind of hint.
--
Rostislav Chudoba - 2014-12-03
Define site level preferences variables at
Main.TWikiPreferences on your site:
* Two-column layout:
<verbatim>
* Set COLUMN_LEFT = <table width="100%"><tr><td valign="top" width="50%">
* Set COLUMN_RIGHT = </td><td valign="top" width="50%">
* Set COLUMN_END = </td></tr></table>
</verbatim>
The verbatim tag avoids the layout issue in the preferences topic.
Details at
TWikiVariables.
--
Peter Thoeny - 2014-12-03
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.