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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:46:19+00:00 2026-05-24T23:46:19+00:00

Here is a much-simplified example: http://jsfiddle.net/guard/MmcEY/3/ The body width is artificially rejected here, though

  • 0

Here is a much-simplified example: http://jsfiddle.net/guard/MmcEY/3/
The body width is artificially rejected here, though it’s not the case for the real app – see below.

There are multiple blocks laid out similar to #d1 and #d2. All of them having min-width set.
There’s also a stripe at the bottom of the screen that must fill the whole width.

On a wide screen everything works fine – there’s enough of body width for blocks to fit, no scrolling and the stripe fills the whole screen width.

But on a narrow screen (emulated in the example with the body width explicitly set) the following happens: the content’s width is actually more than the body’s width. This content make the horizontal scrolling appear, though it doesn’t stretch the body. So, the stripe (the green line at the bottom) occupies less space than the page content.

=====

Well, great, guys, I know it’s because of margin :).

As I said, fixed body width is set here for demonstration only, in the real world the body width is defined by the window size. But several blocks are still outside of the body, so the scroll appears, while body width doesn’t change.

So, is there any way to make the stripe fill the whole window client width while preserving the rest of markup?

I’m working with the existing site, and don’t want completely re-hacking the whole layout (quite complicated and not coded by 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-05-24T23:46:20+00:00Added an answer on May 24, 2026 at 11:46 pm

    It’s because your #d2 element has a negative margin-right set — which means that it’s going to fall outside the body element. If you remove this property then you’ll see that the block falls down to the next line (as #d1 and #d2 are both 150px).

    Essentially, the layout is doing what you’re telling it to do. The stripe is always 200px wide (100% of the body width) regardless of browser window size.

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

Sidebar

Related Questions

I've not gone into much research here, but the intuitive thing is not working:
Here's the code. Not much to it. <?php include("Spreadsheet/Excel/Writer.php"); $xls = new Spreadsheet_Excel_Writer(); $sheet
Probably not much more to elaborate on here - I'm using a NumericStepper control
I'm pretty sure I'm doing something wrong, but I've simplified my example as much
Here's a much simplified version of my code: Create the collection using the collection
A related post here pretty much established reflection in Java as a performance hog.
Here's a much-abbreviated sample of my code. <Grid> <Polygon Name=ply Grid.Column=2 Grid.Row=0 Grid.RowSpan=3 Fill=Orange
UPDATE: So pretty much everyone here has told me that I just need to
Very much a noob here, so it's best to assume I know nothing in
Here's the situation: I've got a class that is doing too much. It's mainly

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.