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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:22:15+00:00 2026-06-14T23:22:15+00:00

Here is a JSFiddle that (for me) shows the problem perfectly. But, I have

  • 0

Here is a JSFiddle that (for me) shows the problem perfectly.

But, I have several divs that load dynamically with images within them, then I have a transparent div over the top that will have some options, however the top div’s location shifts funny when the image behind fully loads.

ANy idea on how to prevent this?

Here is the relevant code:
HTML:

<div id="img">
<img src="http://tbremer.com/images/portfolio/Concert/_MG_6961.jpg" height="200">                        <div id="imgOver">test</div>
</div>

<div id="img">
<img src="http://tbremer.com/images/portfolio/Concert/_MG_6964.jpg" height="200">                        <div id="imgOver">test</div>
</div>

<div id="img">
&nbsp;<img src="http://tbremer.com/images/portfolio/Concert/_MG_7063.jpg" width="200">&nbsp;
<div id="imgOver">test</div>
</div>​

CSS:

#img{
    float: left;
    margin: 5px;
    padding: 0;

    width: 200px;
    height: 200px;

    text-align: center;
    font-size: 1em;

    background-color: rgb(232, 227, 223);
    border: 1px solid #000;
}

#imgOver{
    position: relative;
    top: -200px;

    width: 200px;
    height: 200px;

    background-color: rgba(0,0,0,.7);    
    color: #fff;
}
​
  • 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-14T23:22:17+00:00Added an answer on June 14, 2026 at 11:22 pm

    The correct way to do is like this demo

    Full Demo

    Explanation :
    What you’ve to do is use position: relative; for img and than use position: absolute; for #imgOver and remove top: -200px

    HTML

    <div id="img">                       
        <img src="http://tbremer.com/images/portfolio/Concert/_MG_6961.jpg" height="200">  
    <div id="imgOver">test</div>     
    </div>
    

    CSS

    #img{
        float: left;
        margin: 5px;
        padding: 0;
        width: 200px;
        height: 200px;
        text-align: center;
        font-size: 1em;
        position: relative;
        background-color: rgb(232, 227, 223);
        border: 1px solid #000;
    }
    
    #imgOver{
        position: absolute;
        top: 0;
        width: 200px;
        height: 200px;
        background-color: rgba(0,0,0,.7);    
        color: #fff;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is a JSFiddle that demonstrates the problem... http://jsfiddle.net/L2NBP/5/ For obvious reasons this code
My script is here : jsfiddle i have two attributes in my form that
I have a jsfiddle here . What happens is that if you select a
Here is a sample fiddle: http://jsfiddle.net/K2zyU/4/ The problem I am experiencing is that the
I have a jsfiddle here: http://jsfiddle.net/ybZvv/22/ The situation I have is that if you
I have created a quick jsfiddle here showing it not working. The problem I
I've created an example of the problem here: http://jsfiddle.net/jXLSW/ Notice that when you hover
I have a fiddle here: http://jsfiddle.net/ybZvv/43/ The problem I have is with the text
Here's a JSFiddle that breaks uniquely in Internet Explorer 9. I'm hoping someone has
Here is the example: http://jsfiddle.net/FdT23/4/ The goal is that when you hover your mouse

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.