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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T08:00:45+00:00 2026-05-30T08:00:45+00:00

I am doing a picture viewer for my website. There is a problem of

  • 0

I am doing a picture viewer for my website. There is a problem of opacity with the displayed image. I want my image opacity to 100% and my black background to 80% instead of:

I tried to set opacity directly on my image, but It didn’t work.
enter image description here

I have this jQuery function:

$("img").click(function(event){
        // Create image frame
        $("#imageView").css("width" , $(document).width());
        $("#imageView").css("height" , $(document).height());
        $("#imageView").css("display" , "block");
        $("#imageView").css("opacity" , "0.8");
        $("#imageView").css("background-color" , "black");
        $("#imageView").css("position" , "absolute");
        $("#imageView").css("left" , "0");
        $("#imageView").css("top" , "0");
        $("#imageView").css("z-index" , "9000");
        $("#imageView").css("text-align" , "center");
        
            // Load big picture
        var miniSrc = $(this).attr("src").split("/");
        var imgName = miniSrc[miniSrc.length - 1];
        var bigSrc = "images/big/" + imgName;
        var imgHtml = "<img id='bigImg' src='" + bigSrc + "' alt='' style=\"heigth:200px; width:300px\"/>";
        
        // Insert Picture with animation
        $("#imageView").html(imgHtml);
            
        $("#bigImg").animate({
            height: "400px",
            width: "600px",
        },500);

    });

Imageview is an empty div in my body.

what’s the problem with my css ?

  • 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-30T08:00:46+00:00Added an answer on May 30, 2026 at 8:00 am

    The id="imageView" element cannot have the image as a child – move the image outside.

    This is the same pattern jQuery UI uses when popping modal dialogs…

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

Sidebar

Related Questions

I'm doing an image viewer that pass pictures to next or previous, by clicking
I'm having a problem to inflate facebook profile picture into listview. What I'm doing
Doing the below will reproduce my problem: New WPF Project Add ListView Name the
I am just doing some research into image processing and would appreciate it if
In the first picture of my website (the two persons), shows an URL address
My big picture goal is to have a grey field over an image, and
I have coded this up for a looping picture viewer on my iPad thinking
How could I load a picture from a resource on a background thread? I
I am doing a project where there is a room filled with objects with
I'm doing photo gallery and like to enlarge an image when I click on

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.