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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:08:53+00:00 2026-06-16T00:08:53+00:00

I would like to have a div with a background and inside it more

  • 0

I would like to have a div with a background and inside it more divs with the illusion that their background applies some filter on the parent’s background. As the support for filters is not quite here, I was thinking that I will create the filtered image and then set the background-position attribute of children in such a way that the backgrounds align with the parent. In jQuery, I could write something like:

$this.css('background-position', -$this.offset)

Is it possible to achieve this effect without JavaScript? I was able to get almost what I wanted by setting children background to fixed, but of course I do not want them to be fixed to viewport, I want it to be fixed to parent.

To give you a better idea, here is a quick mockup I put together in Gimp:

enter image description here

EDIT: I have created JSFiddle, with fixed background.

  • 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-16T00:08:53+00:00Added an answer on June 16, 2026 at 12:08 am

    It is not possible to do that using only CSS. Save yourself some time, and look into alternative solution

    see also:

    • CSS background-position fixed to parent
    • background image position fixed to parent element
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table inside a div with a background. I would like to
I have a div that I would like to reposition each time the page
I have a huge SVG file inside a DIV. I would like to scroll
I would like a div to have a transparent background. I tried to do
I have a background image on a div and I would like to change
I have a small menu div that i would like to keep in the
I have a couple of divs with background images. I would like to know
I have a div inside a div and I would like to be able
I have some layout css questions. Their more like best practices and whats the
I have a div that contains some text and the div has a background

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.