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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T02:16:59+00:00 2026-06-04T02:16:59+00:00

Remember: Imagine the behavior on the screen of those elements: <div> with style float:

  • 0

Remember:
Imagine the behavior on the screen of those elements: <div> with style float: left; height: 100px; width: 100px when there is more then 100 on the screen. When you resize your window to the low width: divs will being pushed down

Example
http://1lj.net/ex2.html

What I need:
I need the child divs to act like the linked example, the problem is that they are in a fixed width container. eg. <div class=container style="width:800px">

How to get this behaviour?

sorry for my english, its really hard to write on not native language.

  • 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-04T02:17:01+00:00Added an answer on June 4, 2026 at 2:17 am

    You need two containers. One container is for the max width, the other is to hold the boxes.

    CSS:

    .container
    {
        height:auto;
        max-width: 800px;
        margin: 0 auto;
        background-color: #666666;
    }
    
    .containercontent {
        position: relative;
        width: auto;
        margin: 0 auto;
    }
    

    HTML:

    <div class="container"> <!-- Add this container -->
    <div class="containercontent">
    
    <h2>Lalalalal.</h2>
    
    <div class="box" id=box1></div>
    <div class="box" id=box2></div>
    <div class="box" id=box3></div>
    <div class=box id=box4></div>
    <div class=box id=box5></div>
    <div class=box id=box6></div>
    <div class=box id=box7></div>
    <div class=box id=box8></div>
    <div class=box id=box9></div>
    <div class=box id=box10></div>
    <div class=box id=box11></div>
    <div class=box id=box12></div>
    <div class=box id=box13></div>
    <div class=box id=box14></div>
    <div class=box id=box15></div>
    <div class=box id=box16></div>
    <div class=box id=box17></div>
    <div class=box id=box18></div>
    <div class=box id=box19></div>
    <div class=box id=box20></div>
    
    </div>
    <div class="clean"></div>
    </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I remember the days of Shadowrun that got me excited about hacking. There is
I remember seeing somewhere there ^ operator is used as a pointer operator in
I'm using jQuery Tablesorter plugin, it works fine. However there is a problem. Imagine
Remember the little div that shows up at the top of the page to
I can't imagine that there doesn't exist an efficient, lightweight, secure authentication and authorization
I remember with ASMX there was an easy solution: MyAsmxServiceClient serviceClient = new MyAsmxServiceClient(http://myServiceLocation/myService.asmx);
I remember a few years ago(2002) there was a multipartite virus that could be
I remember there's a redirect function in jQuery. It was like: $(location).href('http://address.com') But what
Remember how floats can't be compared with == against constant, because the float representation
Remember imagemaps? They were all over the place in the 90s. A webpage would

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.