Right Sidebar appears below content

Events happening in the community are now at Drupal community events on www.drupal.org.
Posted by webfunkin on January 14, 2011 at 10:57am

Hi,

I am trying to create a new theme for my Drupal site. I am working with Drupal 6.20 and Zen's latest version.

I have made quite a few changes to the layout of the theme and now my right sidebar appears below the main content.

You can see the problem here (not dynamically generated - saved from a local copy) : http://testcheckchecktest.whackk.com/grab/test1.html

Most of the layout CSS can be found here : http://testcheckchecktest.whackk.com/grab/test1_files/layout-fixed.css

CSS that might be the problem :

.sidebar-second #content {
width: 800px;
margin-left: 0; /* LTR /
margin-right: -800px; /
LTR / / Negative value of #content's width + left margin. */
}

.region-sidebar-second {
float: left; /* LTR /
width: 180px;
margin-left: 800px; /
LTR / / Width of content + sidebar-first. /
margin-right: -980px; /
LTR / / Negative value of .region-sidebar-second's width + left margin. /
padding: 0; /
DO NOT CHANGE. Add padding or margin to .region-sidebar-second .section. */
}

.region-sidebar-second .section {
margin: 0 0 0 0px; /* LTR */
padding: 0;
}

Please, let me know if you can figure out what the problem is..

Categories:

Comments

use a module to generate the theme

Posted by nco71 on January 14, 2011 at 11:26am

I had a look at your theme , at first it seems that your general layout is quite large.
Zen negative margins method is quite difficult to apply sometimes. My advice is get the zenophile module http://drupal.org/project/zenophile for zen and generate your layout using it. Then replace the layout.css file with the new one generated and it should work fine.

yeah, thanks a lot! the whole

Posted by webfunkin on January 16, 2011 at 6:59am

yeah, thanks a lot!

the whole negative margin thing is a real pain in the wrong place!

I rebuilt the theme using zenophile and used it to style the sidebars, works brilliantly now!

AltStyle によって変換されたページ (->オリジナル) /