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

  • Home
  • SEARCH
  • 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 8812009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:30:13+00:00 2026-06-14T03:30:13+00:00

I’m working on my site’s Top Header Bar styles. I’m positioning 2 DIVs inside

  • 0

I’m working on my site’s Top Header Bar styles. I’m positioning 2 DIVs inside the Header DIV.
One Div is on top, while the other is on the bottom.
The top is dedicated to the Left Logo with Links on the Right, while the bottom Div is dedicated to a horizontal menu (which I’ll finish later on).

My problem arises with the Logo’s position. My logo is slightly taller than the top Div, and this causes the bottom Div to simply cover the bottom of my logo. If I crop or resize the logo, problem solved. But I don’t want to do that. I would like to make the Logo on a higher z-index. But it’s not working. Seems the z-index is ignored.

Here’s what I have so far:

<div id="siteHeader">

   <div id="headernav-top" style="height:50px;">
    <div id="headerlogo" style="height:72px;background-image:url('logo.jpg');background-repeat:no-repeat;">
    </div>
    <span id="headertext">  
        Welcome Back, <b>Whomever you are</b> | 
        <a href="/">My Account</a> | 
        <a href="/logout.php">Log Off</a> <br />
    </span>
  </div>

  <div id="headernav-bottom" style="height:39px;background-color:#0C6;">

    More Nav will go here

  </div>
</div> <!-- end siteHeader -->

The headernav-bottom is definitely covering the bottom of the 72px height logo, in the headerlogo div.

And when I put z-index inside both divs, it seems to be ignored.

Is there another way to get the headerlogo to settle above within the siteHeader 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-06-14T03:30:15+00:00Added an answer on June 14, 2026 at 3:30 am

    Seems you already found the answer aaaaand this is the reason why that’s the case: z-index is ignored for statically positioned elements (the default). z-index only takes effect if it is applied to a positon:relative, positon:absolute, or positon:fixed element.

    Adding a non-static position attribute is a common way to force desired stacking of elements. Which one you use is also important:

    position: relative
    This will allow your element to retain its flow in the document. Using this one will keep the other elements from collapsing into the area that the element would have taken up as a static element.

    position: absolute
    This takes the element out of flow. Opposite of relative, this will give it an effective size of 0px by 0px in the document. Other elements will then collapse into the area this element would have occupied otherwise. (Note that this will sometimes make these elements hidden behind your absolute element.)

    positon: fixed
    Same as absolute. Out of flow, but with this one, the element is relative to the window and not the first non-static parent. (only important if you are positioning with top, right, bottom, and left) It will also appear to “stick” to the window as you scroll.

    For your purposes, position:relative with no positioning attributes is probably best.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I know there's a lot of other questions out there that deal with this
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I'm making a simple page using Google Maps API 3. My first. One marker
Let's say I'm outputting a post title and in our database, it's Hello Y&#8217;all
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example

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.