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 3437202
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:02:10+00:00 2026-05-18T08:02:10+00:00

The css: .gs960 { width: 960px; margin: 0 auto; background-color: blue; } #miniContainer {

  • 0

The css:

   .gs960 {
        width: 960px;
        margin: 0 auto;
        background-color: blue;
    }

    #miniContainer {
        width: 960px;
        overflow:hidden;
        background-color: red;
    }

    #sidebar {
       width: 208px;
       float: left;
       background-color: yellow;
    }

    #cartContainer {
        width: 100px;
        background-color: green;
    }

The html:

<body>

    <div id="main">

        <div class="gs960">


                        <div id="miniContainer">



                            <div id="sidebar">
                                <p>Side bar here</p>
                            </div>

                            <div id="cartContainer">
                                <p>I need to be on the right side of Side bar</p>
                            </div>


                        </div><!-- fecha miniContainer -->

            </div> <!-- fecha gs660 -->

    </div> <!-- fecha main -->


</body>

If I apply a float left to #cartContainer is stays on it’s side. But do I need it?

W/out it:
1)
Why the #cartContainer doesn’t stay on the right side of #sidebar ?

It seems that the reason is because the element is floated and as a display block, hence, all elements will stay after it, on a “vertical line”.

However, if we do:

<div id="main">

<div class="gs960">

<div id="miniContainer">

 <div id="sidebar">
      <p>Side bar here</p>
 </div>

    <p>I need to be on theasdsa dasd asda
         I need to be on theasdsa dasd asdas ad asd asd as das das right side of Side bar
         I need to be on theasdsa dasd asdas ad asd asd as das das right side of Side bar
         I need to be on theasdsa dasd asdas ad asd asd as das das right side of Side bar
         I need to be on theasdsa dasd asdas ad asd asd as das das right side of Side bar
         I need to be on theasdsa dasd asdas ad asd asd as das das right side of Side bar
         s ad asd asd as das das right side of Side bar</p>
 </div><!-- fecha miniContainer -->
</div> <!-- fecha gs660 -->
</div> <!-- fecha main -->

2)
*The <p> (that is also block by default right? Doesn’t start after the #sidebar, but at is side. Why?*

Thanks.
MEM

  • 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-05-18T08:02:11+00:00Added an answer on May 18, 2026 at 8:02 am

    Look at that: http://www.jsfiddle.net/pereskokov/XptKx/2/
    Cause is that width of cartContainer is lower that sidebar, so sidebar can’t be placed ‘inside’ cartContainer. In the other words, cartContainer can’t ‘flow round’ sidebar.

    The second variant works because of width of p is default set to 100%.

    Also, may be I misunderstood you, so check another decision if you want to fixed width conainers placed horizontaly, uno tras otro: http://www.jsfiddle.net/pereskokov/wKKsZ/1/

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

Sidebar

Related Questions

CSS: .blue { width:200px; height:200px; background-color:blue; color:#000000; overflow:auto; } JavaScript: function addChar() { $('.blue').append('some
css: .listingContainer { margin:auto; overflow:hidden; padding:0 0 16px 16px; width:660px; } .listingItem { float:left;
CSS: .dynamicDiv { width:200px; border:solid 1px #c0c0c0; background-color:#e1e1e1; font-size:11px; font-family:verdana; color:#000; padding:5px; } Javascript:
CSS #editpro{ background:#CEEBFB; margin-left:30px; margin-right:500px; text-align:center; color:#3687cc; font-size:20px; border:2px ridge #3687cc; border-radius:15px; width:350px; }
CSS: .events_holder { width:100%; background-color: #d9ceae; } .events_holder .event_holder { width:100%; float: left; min-height:
CSS: #holidayclosings ul{ margin:0; padding:0; background:red; } HTML: <ul id=holidayclosings> <li>Saturday, December 24: <b>Closed</b></li>
CSS: .container { margin-left: 15px; width: 10px; background: #FFFFFF; border: 1px solid #CAD5E0; padding:
CSS: #content { width:630px; } .all_friends { background:url(../img/friends.png) no-repeat; margin-left:15px; height:123px; width:615px; padding-bottom:20px; }
CSS: .red-tile-color{ background-color:red; color:white; } JS: var colorName = $(.red-tile-color).css(color); Return: rgb(255, 255, 255);
css #content2 { clear:both; width:1024px; height:auto; position:relative; } #content2 div:first-child { background:#E4ECF7; width:445px; height:25px;

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.