Closed (works as designed)
Project:
Amadou
Version:
6.x-1.1
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
7 Jun 2008 at 11:49 UTC
Updated:
17 Oct 2008 at 09:15 UTC
How can i split the 2 sidebar so that the main content would be in the middle? I was trying to tweak the floats but can't seem to fix it? Hope to hear from you soon. Thanks.
Comments
Comment #1
emdalton commentedIt's not trivial, but I did manage to do this on Drupal 5.7, which should be pretty much the same in Drupal 6. In general, you need to edit the following:
page.tpl.php -- look where the "content" section starts. Below that is the sidebar section. You'll need to split the sidebar sections into two pieces, and put one piece above the main content section, and one piece below. You'll also need to tweak the way the width gets calculated for each sidebar. I chose to create two different width calculation functions (in template.php), but you can probably take a simpler approach if you want to, because splitting the sidebar into two divs means you don't need to be so fancy about calculating the widths of each. Also adjust style names (see style.css).
style.css -- you'll have to break the styles of the two sidebars up. I renamed them sidebar1 and sidebar2. This is because they are id styles, not class styles. You need to do this for the bg styles as well as the inner sidebar content itself. Essentially copy the existing sidebar style sections into two new styles, one sidebar1, the other sidebar2, etc.
layout.css -- more styles here. This is where you'll fiddle with the floats. Again, you'll need to rename these to distinguish left from right, because they are ids, not classes, so they have to have unique names.
template.php -- you may be able to ignore the amadou_get_sidebar_width function, or rewrite the one into two separate functions. You still need get_mainContent_width.
ie6.css -- I had to fiddle extensively with this, and I had to write ie7.css and put a conditional comment in to call it, as well, but that may be because I converted to an elastic layout at the same time.
Good luck! After some additional testing, I may clean up the template files I've been working on and upload them as an amadou variant, but you should be able to get there with these guidelines.
Comment #2
jwolf commented