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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T16:18:56+00:00 2026-06-05T16:18:56+00:00

Question I’d like the CSS background texture for my content area to begin immediately

  • 0

Question

I’d like the CSS background texture for my content area to begin immediately after a variable-height header. The texture has a natural height of 900px and is graduated to a flat color, so if it fits in the available space between content-start and body-end, the whole texture should be displayed. The texture shouldn’t artificially expand the content area or cause unnecessary scroll, but scroll should still appear when content is longer than fits in the page.

JSFiddle

On request, here’s a JSFiddle of my issue. Since there’s really only one DOM element in the question, I think the fiddle doesn’t clarify much. http://jsfiddle.net/AbEUe/5/

What doesn’t work

#contentAndBackground {
    padding-bottom: 900px;
    margin-bottom: -900px;
    background: url('my900pxHighImage.png') repeat-x;
}

The above ensures the whole image is shown, but the negative margin doesn’t keep the unnecessary scrollbars away as I’d hoped.

#contentAndBackground {
    min-height: 900px;
    background: url('my900pxHighImage.png') repeat-x;
}

Same problem. The whole image is shown, but scrollbars are always showing.

I’d like to avoid using JavaScript that needs to handle screen resizing.

  • 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-05T16:18:58+00:00Added an answer on June 5, 2026 at 4:18 pm

    I think I did it: http://jsfiddle.net/AbEUe/7/

    I have created 2 container divs, both have a height of 100%.

    • The first contains header and background, and has overflow:hidden so the background is stopped at the bottom.

    • The second contains header and content, and because of use of positioning this one is on top of the first container, and it can stretch to more than 100% (if the amount of text requires that).

    You can see you have to render the header twice, but that won’t matter because the first isnt visible.

    Edit:

    Solved the last problem (see comment) by also setting the background to the content div. See http://jsfiddle.net/AbEUe/8/

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

Sidebar

Related Questions

Question: Can I override default functions in Javascript? Background: After figuring out that I
Question: I want to untar a tarfile which has many tar files within itself
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
Question should be self explanatory. I have a datagridview which has a column whose
Question: How can I implement shared memory variable in PHP without the semaphore package
Question Can I build a image database/library that has an e-commerce style checkout system
[Question moved in from askubuntu.com] I'd like to get into Ubuntu systems programming; to
question: Can i perform a flush like function to a richtextbox? reason: I am
Question #1: if I have a C++ code like this #include <iostream> using namesapce
Question Is it possible to stop a Message Driven Bean (programmatically), so that it

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.