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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T21:04:21+00:00 2026-06-10T21:04:21+00:00

<style> #container { float: left; max-width: 900px; } .item { float: left; width: 300px;

  • 0
<style>

#container {
  float: left;
  max-width: 900px;
}

.item {
 float: left;
 width: 300px;
}

</style>

<div id="container">

  <div class="item">Much of Text</div>
  <div class="item">Much of Text</div>
  <div class="item">Much of Text</div>
  <div class="item">Much of Text</div>
  <div class="item">Much of Text</div>
  <div class="item">Much of Text</div>
  <div class="item">Much of Text</div>

</div>

I get Mansory working in all situations great:

  • with applied to #container max-width property alone
  • and float: left alone

But sadly it is not working if apply combo of both float: left & max-width.

  1. How to make it working this way and why it is getting not working
    after applying both CSS properties?
  2. I need float #container to the left and in the same time need to
    have max-width on it. Is there any possibility to do it somehow? I
    tried use float: left on container’s parents but no luck.
  • 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-10T21:04:22+00:00Added an answer on June 10, 2026 at 9:04 pm

    The Masonry #container must be positioned relative, the .masonry-brick elements are positioned absolute by the layout engine – that’s the whole point about Masonry working out the positioning of elements automatically. If you change the positioning of the .masonry-brick elements yourself, you’re putting a spanner in the works. See the documentation and the many examples out there. To change the position of the #container, just observe other examples with Chrome’s devtools to see how with preceding elements, margins and padding you can put it where you want.

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

Sidebar

Related Questions

I have a div[class=container] and inside is div[class=item] like: <style type=text/css> .container{ height:50vh; width:
here's sample html: <style type=text/css> .column { float: left; width:33.3%; } #container { text-align:
I have 2 divs floated left so they will appear inline <div class==.container style=width:
<html> <head> <style type=text/css> .container { width: 900px; border: 2px solid #333333; padding-top: 30px;
When doing something like this: <div style=float: left;>Left Div</div> <div style=float: right;>Right Div</div> I
pxI created a style defenition like this: #container { width: 900px; margin: 0 auto;
I have the following css .container {margin-left:auto; margin-right:auto; width:1020px;} .body {float:left; width:1020px;} .leftcont {float:left;
I have this code: #container { position:relative; width:760px; margin-left: auto; margin-right: auto; margin-top: 10px;
Remember: Imagine the behavior on the screen of those elements: <div> with style float:
<html> <head> <style> * { margin:0; border:0; padding:0; } div { height:500px; } #container

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.