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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T10:29:11+00:00 2026-06-12T10:29:11+00:00

I need inline DIVs to be spaced equally betweenn each other, and additionally between

  • 0

I need inline DIVs to be spaced equally betweenn each other, and additionally between border and first (or last) DIV in the row.
I use solution found on Fluid width with equally spaced DIVs. It gives me equal spacing between DIVs, but left DIV sticks to the left border, and right DIV sticks to the right. I’d like it to be equally spaced from the borders as they are from each other.

UPDATE:
content DIVs are being created dynamically by Django, so I cannot say how many of them will be there in the line (between 1 and 4).

How can I create additional space on sides which will be equal to distance between DIVs?

Here is html:

    <div class="container">
        <div class="content">
                <canvas width="130" height="130"></canvas>
            </div>
            <div class="content">
                <canvas width="130" height="130"></canvas>
            </div>
            <div class="content">
                <canvas width="130" height="130"></canvas>
            </div>
        </div>

and css:

div.container {
    width: 100%;
    text-align: justify;
}


div.content {
    display: inline-block;
    width: 20%;
    margin: 0 auto;
}

div.container:after {
    content: "";
    width: 100%;
    display: inline-block;
}
  • 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-12T10:29:13+00:00Added an answer on June 12, 2026 at 10:29 am

    And right after asking the question, I’ve figured out the answer (how ironic?). I’ll share it in case someone needs it.

    What I’ve done was creating spacer DIVs with 0 width before first and last content DIV. Here is how it looks like:

    HTML:

        <div class="container">
            <div class="spacer"></div>
            <div class="content">
                <canvas width="130" height="130"></canvas>
            </div>
            <div class="content">
                <canvas width="130" height="130"></canvas>
            </div>
            <div class="content">
                <canvas width="130" height="130"></canvas>
            </div>
            <div class="spacer"></div>
        </div>
    

    and css:

        div.container {
            width: 100%;
            text-align: justify;
        }
    
    
        div.content {
            display: inline-block;
            width: 20%;
            margin: 0 auto;
        }
    
        div.container:after {
            content: "";
            width: 100%;
            display: inline-block;
        }
    
        div.spacer {
            display: inline-block;
            width: 0;
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i want to have divs in one div and they need to be in
I have a div with 2 divs in it with display: inline-block since their
I have two divs inside a container div. One need to float left the
I have a div whith contains another divs with image. I need to have
I’m trying to stack the #Direction Div on top of the two other Divs
I have this html: <div id='calendarControlPane'> <div id='calendarControl'> <div style=border-style:solid; display:inline-block;> <div style=width:14;height:15;> </div>
I need to grab inline script tags inside html pages. The regex will eventually
Situation is simple. I need to wrap text around two inline objects (buttons with
I have a problem where I need to line up some DIVs. I made
Is there a way we could conjoin three divs together? Hello <div class=mainContainer> <div

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.