javascript - How to add a close button to jquery Lightbox? -


i made lightbox , want add close button it. here have:

    <style>         .black_overlay{             display: none;             position: absolute;             top: 0%;             left: 0%;             width: 100%;             height: 100%;             background-color: black;             z-index:1001;             -moz-opacity: 0.8;             opacity:.80;             filter: alpha(opacity=80);         }           .white_content {         width:600px;         height:560px;         padding: 16px;          top: 5%;          left: 25%;          position: absolute;          display: none;         -webkit-border-radius: 20px;         -moz-border-radius: 20px;         border-radius: 20px;         border:2px solid #ffffff;         background-color:#ffffff;         -webkit-box-shadow: #c9c9c9 8px 8px 8px;         -moz-box-shadow: #c9c9c9 8px 8px 8px;         box-shadow: #c9c9c9 8px 8px 8px;         z-index:1002;         overflow: auto;      </style>     </head>     <body>         <p><a href = "javascript:void(0)" onclick = "document.getelementbyid('light').style.display='block';document.getelementbyid('fade').style.display='block'">here.................................................................................................</a></p>         <div id="light" class="white_content"><center><img src="http://theamazingmonth.pusku.com/files/help.png"> <br> <!--- text help.</---> <p align="left"> <div class="tilt pic">     <img src="http://theamazingmonth.pusku.com/clues/envelope.png" height="114" width="193" alt="">   </div>  <a href = "javascript:void(0)" onclick = "document.getelementbyid('light').style.display='none';document.getelementbyid('fade').style.display='none'">x</a></div>         <div id="fade" class="black_overlay"></div>     </body> </html>  

how can add close button top corner of popup window?

add class close on <a> tag , put <div> tag, content too.

<div id="light" class="white_content">     <div class="white-header>"         <a class="close" href="javascript:void(0)" onclick="document.getelementbyid('light').style.display='none';document.getelementbyid('fade').style.display='none'">x</a>     </div>      <div class="white-body">     content here     </div> </div> 

on class .white_content remove overflow: auto;

i have made it, can see on jsfiddle , edit jsfiddle


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -