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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T05:54:31+00:00 2026-06-12T05:54:31+00:00

I have Div named Container whose width is 100%; so its actual width in

  • 0

I have Div named Container whose width is 100%; so its actual width in pixels can be changing from one user to another. Inside that Container, I have 10 boxes, each with the following values:

width:8%;
margin-left:1%;
margin-right:1%;
border:1px solid #000000;
float:left;

With those values, it should render like this, right?

how it should be like

Actually it’s not. The boxes have 8% width in space and 2% width out space (margin)and because of the border line (1px), every box have 10% width + 2px

When you play with the resolution, you will see that from time to time the boxes are extending a second line and it appears like this: enter image description here

How can i fix this layout?

I thought about placing another box inside those boxes which would set the border for the outer box, but it’s not quite working for me.

  • 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-12T05:54:32+00:00Added an answer on June 12, 2026 at 5:54 am

    I have created a jsfiddle for this. Adding a new div for each inner boxes and setting following properties will solve the problem. (The key was to move the border from the out boxes to the inner box.)

    width: 100%;
    height:100%;
    border: 1px solid #000000;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a container div tag which wraps an image named tray which provides
I have a div class named switch control which has a div class named
So I have a div whose content is generated at runtime it initially has
I have a div as a container for a file view. This div has
Core issue : http://jsfiddle.net/pipip/P46Xg/ I have a div container with a few paragraphs of
I have this simplified code: <div class=container> <input type=submit name=submit class=submit value=Sign Up> </div>
I have this code in my html: <form> <div style=width:530px; height:220px; overflow-y:scroll;> <div class=people>
I have many DIV with the same class name, let save wmplayer. I want
Morning, I have the following HTML: <div id=sah_padding> <div id=sah_holder> <div id=sah_name>Hello [agent_name]</div> <div
I know css animation have a shorthand of -webkit-animation: div { -webkit-animation-name: example; -webkit-animation-duration:

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.