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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T20:51:39+00:00 2026-05-29T20:51:39+00:00

I am creating a header which is a blue bar which is 40px high

  • 0

I am creating a header which is a blue bar which is 40px high and spans 100% of the browser. It is static.

Under that (as in half hidden by the static blue bar) I want to position an image, but need the image to be centered in the browser. Also must be static.

Then on top of both of those I have the header content.

The problems are:

When i add any type of position instruction the blue bar is not fixed. The image always seems to be on top of the blue bar regardless of z-index settings. There is a gap at the top of the page, not the blue bar but the image and header content.

Here’s the css i’m trying:

#topbar {
width:100%;
height:42px;
margin:0;
padding:0;
background: #0066cc; 
/* make top bar stick to the top of browser */
position:fixed;
z-index:800;
/*Making sure it sticks to left of window in IE7*/
top:0;
left:0;
float:left;
-webkit-box-shadow: 0 8px 6px -6px #666;
    -moz-box-shadow: 0 8px 6px -6px #666;
    box-shadow: 0 8px 6px -6px #666;
position:absolute; /* if I remove this it sticks but still same other problems */
}

#top_blur {
width:940px;
margin:0 auto;
height:70px;
z-index:1;
background-image: url('/images_/backgrounds/top_blur.png');
background-repeat: no-repeat;
position:relative;
}

.header {
width:940px;
margin:0 auto;
}

and am firing it with:

<div id="topbar">
<div id="top_blur">
<div class="header">content here</div></div></div>
  • 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-29T20:51:44+00:00Added an answer on May 29, 2026 at 8:51 pm

    .header and #top_blur are children or decendents of #topbar so they will always be on top. See this https://developer.mozilla.org/en/Understanding_CSS_z-index/The_stacking_context for more details. Separating the divs will let you overlap them.

    This fiddle may help: http://jsfiddle.net/zagc6/

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

Sidebar

Related Questions

When creating templates I typically have 3 separate parts (header, body, footer) which I
i am working on project in which we are creating a web service that
I'm creating a header that holds an image (logo) and a navigation. The UL
I am currently working on creating a header file that acts like the standard
Basically I have code which looks like this inside a header file: class Bar;
I am creating a customized listview header that has the header text but also
I'm creating a the first row of a table to display header text that
I'm creating an dynamic image, which creates headers on my page using PHPs GD-library.
When creating a new C++ header/source file, what information do you add to the
Creating liquid layouts is an immense pain. Now, I totally understand that tables 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.