Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8293535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T13:51:40+00:00 2026-06-08T13:51:40+00:00

In Drupal Zen theme, I noticed that the sidebars and the main divs are

  • 0

In Drupal Zen theme, I noticed that the sidebars and the main divs are all floated to the left with each div’s margin-right set back to the 0 position of the page. You can see the demo here. I know that there are many ways to achieve the same result, but I’m just curious about the advantage of using this approach. Why not just have the sidebar-second float to the right? Thanks in advance!

#main {
    float: left;
    margin-left: 20%;
    margin-right: -80%;
    width: 60%;
    background-color: #eee;
}

#sidebar-first {
    float: left;
    margin-left: 0;
    margin-right: -20%;
    width: 20%;
    background-color: #FFFF66;
}

#sidebar-second {
    float: left;
    margin-left: 80%;
    margin-right: -100%;
    width: 20%;
    background-color: #FFFF66;
}

​

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T13:51:42+00:00Added an answer on June 8, 2026 at 1:51 pm

    First thing to come to mind is that floating them all to the left would keep each container butted up to the others. Were the second sidebar floated to the right and the containing div larger than the sum of its child divs than that second sidebar would end up space out from the others. It’s easier to keep the layout fluid with them all floated to the left.

    Second thing to come to mind, and probably more fundamentally important, is that it’s just generally good to only apply things like floats and margins in one direction. When they all go in one direction it’s a lot easier to keep track of while you’re developing. Having margins that push down and push up or floats that go right and left just add a layer of confusion for the developer.

    There are also some IE bugs regarding the directions of floats in relation to the directions of margins, though I can’t remember them exactly… think it’s something like not applying margins in the same directions of floats… hence them floating left and margin-ing(?) right.

    P.S.:

    Harry Roberts the CSS Wizard wrote a great article on why to keep margins and things all in one direction.

    And the first article on the IE Bug when adding a margin in the same direction of a float.. The problem is it will double the margin in IE5/6. IMHO I don’t think we need to design for lte IE6 anymore, but it’s still probably best practice to put margin and float in opposite directions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working with the Zen theme in Drupal and have discovered that I can
When using a Zen sub-theme in Drupal, I get the following warnings. How can
I am currently trying to create a Drupal theme as a Zen subtheme, by
I am using Drupal 6.x with Zen theme. Currently, the following 3 user functions
In drupal, keep getting an upgrade message all over site from htmlpurifier that a
I did a new Drupal theme for my site based on the Zen theme.
I'm creating a site in Drupal 7 with the Zen theme. When I started
I know that the Zen starting theme is very popular but I find it
Drupal employs a custom session handler that changes the familiar...: $_SESSION['foo'] = 'bar'; echo
Does Drupal parse (and/or run) hooks that are unrelated to the content being loaded

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.