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

  • SEARCH
  • Home
  • 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 8885007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:12:12+00:00 2026-06-14T21:12:12+00:00

I have used emptycanvas as a starting point for wordpress. I’ve set the .wrapper

  • 0

I have used emptycanvas as a starting point for wordpress. I’ve set the .wrapper to 80% width with a max-width:1250px;

The Container, which holds the content/sidebar is set to width 100%, and the content has no width set, and is set to float:left; with no other options, the sidebar is set to 350px; with float:right….for some reason it refuses to float and always goes below the content! If I set a width of for example 500px on the content everything goes into place….I thought without a specified width it will automatically adjust to the items floating around it…so what am I doing wrong here?

Unfortunately this is on a local server so I cannot show the exact code but there isn’t anything extra here that I haven’t told you..

Thanks!

  • 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-14T21:12:13+00:00Added an answer on June 14, 2026 at 9:12 pm

    You need to rectify two problems for your layout to work as intended(please see below the code I just created based on your description)

    1. You need to specify the width of the content div. Otherwise, the width of the div will be determined by the widths of the content inside it. This cannot give you manageable layout.

    2. The two floated DIVs cannot be contained inside the container div (You can check this by giving different backgrounds to the container, content and sidebar divs as I did below) This is because, non-floating division cannot contain only floated contents, with its default display setting (default display property for the div is block). To solve this problem, you need to change the display property of the container to table. The other way to contain the content and sidebar inside the container is to add one more non-floated div and clear it from floated objects(clear:both).

      The HTML

      <body>
      
          <div id="wrapper">
              <div id="container">
                      <div id="content">
                           <h1> I am inside content. what will happen if I increase the content in here? </h1>
                      </div><!--End of content-->
                      <div id="sidebar">
                            <h1> I am inside the side bar </h1>
                      </div><!--End of sidebar-->
              </div><!--End of container-->
      
          </div><!--End of wrapper-->
      
      </body>
      

    The CSS

    #wrapper{
    margin:0 auto;
    width:80%;
    max-width:1250px;
    }
    #container{
    width:100%;
    background:red;
    display:table; /*This is necessary to wrap the two floated contents inside. The other way of achieving same result is to add some non-floated div and set to clear floated contents*/
    }
    #content{
    float: left;
    background:green;
    }
    #sidebar{
    width:350px;
    float: right;
    background:blue;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have used this in my HTML: <q> Hai How r u </q> Which
I have used an expander control to create some sort of slide-out panel which
I have used split function to split the string in javascript. which is as,
I have used ajax in the code which works perfectly and give me json
I have used the script from batch file which asks for username/password + registration
I have used a prototype plugin which filters the contents of a dropdown as
I have used the code available from http://codeblitz.wordpress.com/2009/06/22/jquery-charts/ It uses jqPlot. So I have
I have used the STS(Spring Tool Suite) to create a compiled groovy script which
I have used the silverlight control in CRM 2011.It also published on form but
We have used Shibboleth to authenticate users. It works great. The issue is that

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.