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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T01:38:41+00:00 2026-06-18T01:38:41+00:00

I have set up some background div’s to theme a blog I am making.

  • 0

I have set up some background div’s to theme a blog I am making. I am using 3 colors for the heading, a grey background, and I am wanting to add a texture to the background. I have the semi transparent image I want to tile, but I am not sure of the best way to have this work. I do NOT want position: fixed; on the div containing the image, so that it will move as you scroll.

Example code:
http://jsfiddle.net/YPXmT/

Is there a way to achieve this while not having scroll bars? (Note, I don’t want to get rid of scrollbars, as content may require scrolling.)

  • 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-18T01:38:42+00:00Added an answer on June 18, 2026 at 1:38 am

    Going from your example fiddle, you were most of the way there. All you have to do is make your backgroundTexture div height and width 100% instead of the static pixel values you used:

    #backtexture {
        position: absolute;
        overflow: hidden;
        width: 100%;
        height: 100%;
        background : url('http://static.tumblr.com/wyzt2fm/Hq8mhgfry/hp_asset_diagonalline.png');
    }
    

    MORE SIMPLE UPDATE:
    Simplicity is best most times.
    All you should need to do is add:

    body{
        position: relative
    }
    

    Don’t bother making the container div and rearranging the elements as below, just making the body’s position relative should fix this for you.


    UPDATE: (Use update above, keeping this for posterity)
    As per the comments below, with the code above any content that makes the window scroll beyond the visible space will not include the background. This is because the div is set to position: absolute and height/width: 100%. The div is getting sized to the size of the viewable space, but any content that extends beyond that will cause the background div to look like it has stopped. To fix this problem you just need to tweak your HTML and CSS a little bit more. Instead of the CSS above use:

    #backtexture {
        width: 100%;
        height: 100%;
        background : url('http://static.tumblr.com/wyzt2fm/Hq8mhgfry/hp_asset_diagonalline.png');
    }
    

    Notice we removed the position:absolute and overflow:hidden. Next we change the HTML so that the background isn’t just an empty div placed on the page, but instead used as a container for all other elements on the page:

    <div id="backtexture">
            <div id="redtop"></div>
            <div id="orangetop"></div>
            <div id="yellowtop"></div>
            <div id="wrapper">
    </div>
    

    And that should do it.

    Forked fiddle: http://jsfiddle.net/digthedoug/pVxSq/

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

Sidebar

Related Questions

I have one AlertDialog which is working fine.I have set some background images to
I have a page where the background colour can be set dynamically. In some
I'm using Google Test Framework to set some unit tests. I have got three
I have some set of list items like- <div class=smenu> <ul> <li ><a href=index.html><img
I have a div with border-radius set to some value (let's say 10px), and
I have some dynamic text contained in a div that is set to whatever
I have some divs, and they have their backgrounds set as images using this:
I have the following HTML: <div class=block-content no-title grey-bg> How can I set the
In my init I have set some variables and one animate that uses those
I have to set some routing rules in my php application, and they should

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.