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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:35:29+00:00 2026-05-28T17:35:29+00:00

So i have one div and inside i have img tag. SO what i

  • 0

So i have one div and inside i have img tag. SO what i would like to do is put that div background on top of img, i know i could use another div with absolute position to do that but maybe it’s possible to do it with only 1 div?

This is my code:

<div id="container">
   <img src="image.jpg" />
</div>

EDIT Sorry for explaining it all wrong, but i want to background over the image, and from what i can see right now it’s not possible without extra 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-28T17:35:30+00:00Added an answer on May 28, 2026 at 5:35 pm

    Simply put, you can’t with that code.
    The best you could do is use some positioning and z-index properties within a single div.

    <div id="container">
       <div id="cover"></div>
       <img src="image.jpg" />
    </div>
    

    Then use CSS to move the cover div above the image.

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

Sidebar

Related Questions

I have two divs one inside another, i would like to overlap one div
suppose i have one div and div has img tag like <div><img src='img1.png'/></div> so
i have one div and div has one img tag but image is not
i have textarea and lot of other HTML elements inside one div, like this:
I have one parent DIV inside parent DIV i have two DIV one in
I have one large div with one smaller div inside it. The smaller div
I have one horizontally div on the top of my page with a height
I have a function in Javascript that moves one div depending on the mouse
I have a list like this: <ul> <li id=adm-thumb onclick=javascript:addBanner('bowling.jpg');> <div class=adm-tick></div> <img src=img/banners/bowling.jpg
I have two functions I would like to use in my before callback with

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.