converting default template into a 3-column layout

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
ceci
New Member
New Member
Posts: 9
Joined: Mon Sep 29, 2008 9:45 pm

converting default template into a 3-column layout

Post by ceci »

hi guys.

I am using the default template shown here (http://current.cmsmsdemo.com/) I would like to place the 'NEWS' section into its own column on the right-hand side.  I added an extra div but it gets all screwed-up.

Has anyone tried doing this? Do you  mind sharing some code?

Thanks
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm
Location: Raalte, the Netherlands

Re: converting default template into a 3-column layout

Post by RonnyK »

First, make sure that the floating divs (left and right) are called before the main one...., like:
 
 

     
     
     
     

   
   
   
   

     
     
        {title}
        {content}

     
     
     

 
 
Then make sure that space is there for the left/right column, and that the rest is used for the middle, in this example with fixed width, but you can use the flexible width as well....
div#leftsidebar {
  float: left;
  margin-left: 0px;
  margin-right: 0px;
  width: 120px; 
  padding:  0px 2px;
}

div#rightsidebar {
  float: right;
  margin-left: 0px;
  margin-right: 0px;
  width: 120px; 
  padding:  0px 2px;
}

div#main {
  margin-left: 125px;
  margin-right: 125px;
  padding: 0px;
}
Ronny
Post Reply

Return to “Developers Discussion”