Add a Side Bar to Your Topic

THESE PAGES ARE STILL UNDER CONSTRUCTION AND DO NOT NECESSARELY REFLECT THE CURRENT VERSION OF TÓPICO

In this tutorial, you'll learn how to add a sidebar to your topic.

Create a new style for the side bar

Follow these steps to create a new style for the side bar:

  1. Open the stylesheet for editing;
    1. Click on the small e button beside the stylesheet drop down;
    2. Select the file name that's visible in the stylesheets drop down list;
  2. Go to the bottom of the stylesheet;
  3. On a new line, add the following style:
    CSS
    div.sidebar {width:144px; margin:4px; padding:4px; 
                background:#F5F5F5; color:Black; border:1px solid Black; 
                float:right;}
    
  4. Save the file.

The above style will float a 144 pixels wide <div> element to the right side of the published page.

Add the side bar style to the drop down list

Follow these steps to add the side bar style to the drop down list.

  1. Right-click on the Styles button above the editor;
  2. From the popup menu, select a style list (pick your choice) to add the style to;
  3. Once the file is open, add the style definition below to an appropriate group;
  4. Save the file.
XML
<style>
 <name xml:lang="en">Sidebar (right)</name>
 <name xml:lang="fr">Encadré (droite)</name>
 <description xml:lang="en"/>
 <description xml:lang="fr"/>
 <elt>div</elt>
 <attr>
  <name>class</name>
  <value>sidebar float-right</value>
 </attr>
</style>

Your new custom style is now ready to use. The side bar at the top right of this page was added this way.

THESE PAGES ARE STILL UNDER CONSTRUCTION AND DO NOT NECESSARELY REFLECT THE CURRENT VERSION OF TÓPICO

55 / 194