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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T01:54:24+00:00 2026-06-09T01:54:24+00:00

I have a lightbox. The html code: <a id=show-panel href=#>Show Panel</a> <div id=lightbox-panel> <h2>Lightbox

  • 0

I have a lightbox. The html code:

<a id="show-panel" href="#">Show Panel</a>

<div id="lightbox-panel">
<h2>Lightbox Panel</h2>
<p>You can add any valid content here.</p>
<p align="center">
    <a id="close-panel" href="#">Close this window</a>
</p>
</div><!-- /lightbox-panel -->
<div id="lightbox"> </div><!-- /lightbox -->

The CSS:

 * /Lightbox background */
 #lightbox {
 display:none;
 background:#000000;
 opacity:0.9;
 filter:alpha(opacity=90);
 position:absolute;
 top:0px;
 left:0px;
 min-width:100%;
 min-height:100%;
 z-index:1000;
}
 /* Lightbox panel with some content */
 #lightbox-panel {
  display:none;
  position:fixed;
  top:100px;
  left:50%;
  margin-left:-200px;
  width:400px;
  background:#AFFFFF;
  padding:10px 15px 10px 15px;
  border:2px solid #CCCCCC;
  z-index:1001;
}

The demo is prefect of course.

However if we remove the CSS for lightbox, http://jsfiddle.net/zhshqzyc/HjCyA/1/
the form didn’t change at all. I just wonder what is the function of the CSS of lightbox?

  • 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-09T01:54:26+00:00Added an answer on June 9, 2026 at 1:54 am

    Do you see something strange with this comment?

    * /Lightbox background */
    #lightbox {
    

    This is currently not a comment, but a very malformed selector:

    * /Lightbox background */ #lightbox {
    

    Let’s fix it:

    /* Lightbox background */
    #lightbox {
    

    Now you can see what #lightbox does 🙂

    http://jsfiddle.net/HjCyA/3/

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

Sidebar

Related Questions

i write some html with JS into a div. like this $(#picdiv).html(<a rel='lightbox' href='pic.jpg'><img
ive created a lightbox where I have centered the div horizontally and vertically with
Any ideas StackOverflow wizards... I have added window.parent.document to the code, this works without
I have the website : http://alfer-ks.eu5.org/dyer_galeri.html , and as you can see, some pictures
I'm using Fancybox as a lightbox. I have videos set up in external html
Hy Guys... i have some lightbox script where i can build custom buttons. I've
I have a nav button that loads a new page (create.html.erb) through Lightbox 2.
I was using jQuery.load() to load a html page's content into a lightbox. The
I have this code in some of my ASCX files: <%=Html.ActionLink(Resources.Localize.Routes_WidgetsEdit, Edit, Widget, new
I have a project where I want to show a specific div (about the

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.