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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T22:08:05+00:00 2026-06-03T22:08:05+00:00

Here is a recreation of a problem i ran into last week. I have

  • 0

Here is a recreation of a problem i ran into last week.
I have 3 boxes and want to shift 2 of them left so they fit into its parent box. I can shift them successfully but CSS fully ignores that they can fit into the width and puts the last box in a new line which completely ruins the look. Here is a demo I see the problem with firefox 11 and chrome 18. How can i affect the css so the 3 boxes will fit in the line since it obviously can when doing the left shift.

The html (the second part is just to see the shift is working vs if there was no shift.)

<div class="A">
    <div class="B"></div>
    <div class="C"></div>
    <div class="D"></div>
</div>


<div class="A2">
    <div class="B2"></div>
    <div class="C2"></div>
    <div class="D2"></div>
</div>

The css

.A { width: 290px; height:200px; background-color: red; }
.B, .C, .D { width: 100px; height: 100px; }
.B, .D { background-color: green;}
.C { width: 100px; background-color: blue; }
.A div { float: left; }
.C, .D { position:relative; left: -50px; }


.A2 { width: 290px; height:200px; background-color: red; }
.B2, .C2, .D2 { width: 100px; height: 100px; }
.B2, .D2 { background-color: green;}
.C2 { width: 100px; background-color: blue; }
.A2 div { float: left; }
  • 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-03T22:08:06+00:00Added an answer on June 3, 2026 at 10:08 pm

    If you want them all to fit on one line, you can use negative margins.

    You have 10px of extra space to count for, so you might want to divide as evenly as possible, something like this ( a bit awkward with 3 elements):

    .B{ margin-left: -3px; }
    .C{ margin-left: -3px; }
    .D{ margin-left: -4px; }
    

    http://jsfiddle.net/M6uBk/15/

    There are many other ways to do it or you can adjust these number any way so they add up to 10, it just depends on how much of which elements you want showing since it can’t possibly all fit within the container.

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

Sidebar

Related Questions

Here is the recreation of my problem http://jsfiddle.net/WsFyV/7/ Select any option from the first
Here's my problem. I have an mx:Image within an mx:DataGrid column. If I do
I have quite the problem here. I have an MVP application where I have
It's not the first time I'm bumping into this problem and never have the
I have been working on a problem relating to UITableView and cellForRowAtIndexPath. I want
Here is the Javascript I currently have <script type=text/javascript> $(function() { $('.slideshow').hover( function() {
I am banging my head on the wall here due to this problem: When
Here's the scenerio. I have a report that is grabbing daily counts from the
I need some things clarified here: I have a website that updates the values
I have created an accordion menu. Here is my js code: var menu =

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.