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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:30:56+00:00 2026-05-26T14:30:56+00:00

I have the following CSS, What im trying to do is have the background

  • 0

I have the following CSS, What i”m trying to do is have the background smaller than the foreground so the the foreground looks as if it is bursting out of the edges.

header.png and center.png have greater widths than the background, but they themselves have to be background images as they will have text layered on top.

Now i’ve tried using Z-index, but for some reason the foreground images still keep shifting 42px to the right, I then positioned the foreground images via left:-42px; and the text that would sit within the foreground divs would not position where I would like it to. So the CSS below has been reset to my default.

#wrapper {  /* Used for centering the webpage */
    width: 1044px;
    display: block;
    margin: 0 auto;
}

#container { /* Used for background image */
    width: 960px;
    display: block;
    margin: 0 auto;
    overflow: auto;
    backgorund: url(images/bg.png)
} 

/* Foreground Images */

h1 {
    width: 1044px;
    height: 196px;
    display: block;
    margin: 0 auto;
    background: url(images/header.png) no-repeat center;
}

#center_piece {
    width: 1044px;
    height: 492px;
    display: block;
    margin: 0 auto;
    background: url(images/center.png) no-repeat center;
}
  • 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-26T14:30:57+00:00Added an answer on May 26, 2026 at 2:30 pm

    One possible solution is to wrap each “burst piece” in a relatively-positioned element, and then making your h1 and #center_piece absolutely positioned within it.

    Demo: http://jsfiddle.net/KZeuN/

    HTML:

    <div id="wrapper">
        <div id="container">
            <div id="h1_origin">
                <h1>H1</h1>
            </div>
            <div id="center_piece_origin">
                <div id="center_piece">
                    Center Piece
                </div>
            </div>
        </div>
    </div>
    

    CSS:

    #wrapper {  /* Used for centering the webpage */
        width: 1044px;
        display: block;
        margin: 0 auto;
    }
    
    #container { /* Used for background image */
        width: 960px;
        display: block;
        margin: 0 auto;
        /* remove overflow: auto; */
        background: url(images/bg.png)
    
    
    }
    
    /* Foreground Images */
    
    h1 {
        width: 1044px;
        height: 196px;
        display: block;
        margin: 0 auto;
        background: url(images/header.png) no-repeat center;
        position: absolute;
        top: 0; /* Adjust */
        left: -25px; /* Adjust */
    }
    
    #center_piece {
        width: 1044px;
        height: 492px;
        display: block;
        /* remove margin: 0 auto; */
        background: url(images/center.png) no-repeat center;
        position: absolute;
        top: 0; /* Adjust */
        left: -25px; /* Adjust */
    }
    
    #h1_origin {
        position: relative;
        height: 50px; /* Adjust */
    }
    
    #center_piece_origin {
        position: relative;
        height: 50px; /* Adjust */
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following css code. button.png is image where 3 button states are
I have the following CSS .ul{ list-style-image:url(/images/bullet.png) } My bullet.png is 20 x 20px
I have the following CSS code .editable:before { content: url(../images/icons/icon1.png); padding-right:5px; } this is
I have the following CSS and HTML: .TestPadding{ width:29px; text-align:center; height:18px; padding:3px 0px 2px
I'm trying to figure a solution out to the following. I have the following
I'm trying to teach myself CSS and have the following markup: <style type=text/css> #content
I have the following jQuery that I'm trying to use to change the background
I am trying to make the background image I have in CSS turn into
I have the following css code: #Layer3 { position:absolute; width: 89%; height: 40%; left:
I have the following CSS class: .hidden { visibility: hidden; position: absolute; } I

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.