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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:31:00+00:00 2026-06-09T13:31:00+00:00

To space things equally in CSS is relatively simple. There are also many questions

  • 0

To space things equally in CSS is relatively simple. There are also many questions on stack overflow pertaining to it, but one thing it does not explain is how to put spaces (or margin-left & margin-right) between each box.

To illustrate, this is what I would like to accomplish:
accomplish

I feel like I’m taking a long route by using three differently named divs to make this happen:

CSS:

#moreinfobar
{

}
#moreinfobarbox
{
float:left;
width:33.33%;
}
#moreinfobarbox-info
{
margin:0 20px;
background-color:#ffffff;
-webkit-box-shadow:  0px 0px 5px 1px #000000;
box-shadow:  0px 0px 5px 1px #000000;
}

HTML:

<div id="moreinfobar">

                <div id="moreinfobarbox"><div id="moreinfobarbox-info">Test1</div></div>
                <div id="moreinfobarbox"><div id="moreinfobarbox-info">Test2</div></div>
                <div id="moreinfobarbox"><div id="moreinfobarbox-info">Test3</div></div>


            </div>

I tried to get it work with two separately name divs to no avail. Is it possible to condense my code?

JSFIDDLE:

Three divs (WORKS):

http://jsfiddle.net/JsA25/

Two divs (BROKEN):

http://jsfiddle.net/TxT4T/1/

  • 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-09T13:31:01+00:00Added an answer on June 9, 2026 at 1:31 pm

    The best way I feel is to just set the margin to 5%. Here’s the jsfiddle: http://jsfiddle.net/dwbed/

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

Sidebar

Related Questions

I would like to animate things in 3D space. I know this is possible
having a bit of trouble with replacing things that are NOT 0-9A-Za-z[:space] because I
One of the things that has always bothered me about <jsp:include..> is that it's
This image gives a good picture about Virtual Address space. But it only says
Using c# regex I'm trying to match things in quotes which aren't also in
I am making a 2d space game with many moving objects. I have already
We use MSBuild to run a project which, among many other things, reads some
Imagine a space shooter with a scrolling level. What methods are there for preventing
There's a lot of blank space at the bottom of my web page. I
This is one of those things I learned a long time ago and never

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.