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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T13:38:04+00:00 2026-05-15T13:38:04+00:00

I have a div 300 x 200px, and put some words in it with

  • 0

I have a div 300 x 200px, and put some words in it with 180px font-size.

Below it, there are 2 images.

So naturally, the images cover up the words, because the images are at a later stage of the document, so it will cover up previous elements. (if the HTML elements are viewed as in a tree structure, then it is the order of depth-first-search)

But once I changed the CSS of that div to position: relative, then the words will cover up the images partially. (O will cover up the images only where there is a stroke of the letter, the space inside O will still show the images through)

I thought only by changing the z-index can I make it cover up the images? The words are still in the normal flow of the document… is there a special rule that says position: relative is supposed to cover up the other non-positioned elements?

  • 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-15T13:38:05+00:00Added an answer on May 15, 2026 at 1:38 pm

    Yes, positioning, z-index and floating all have an influence on the relative stacking of elements. And inheritance of these properties from ancestors.

    You’ll find a good tutorial/explanation on Mozilla’s website: Understanding CSS z-index and a tool to visualize and play with on tjkdesign’s site: How z-index works! (the related article is shorter than mozilla’s one btw ;))
    IE (used to) behave(s) … differently (at least IE<8 edit: not IE9+ and Edge)

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

Sidebar

Related Questions

I have a layout as follows: <div style=width: 300> <div style=width: 300>Some Content</div> </div
I have a DIV that contains 300 words that are an advantage for my
I have a div which contain lots of input[type=text] fields. I want to put
I want all the images in a div to have a certain margin property,
i have a div with position:relative . Inside that div i have placed images
I have DIV element which only has a few lines in and a background
I have div class=contentBlock which is treated as the container for updating <div class=contentBlock></div>
I have div ( #child ) which won't expand to the full height of
I have div which has three buttons as, <div id=buttons> <input id=preview class=ButtonStyle type=submit
Suppose I have div and I want to fetch data and push data into

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.