Uite aici un exemplu, insa nu are butonul de close.
Pune te rog http :// in codul <script type="text/javascript" src="code.jquery.com/jquery-1.7.1.min.js"></script>
Cod HTML:<style type="text/css"> .popup{ border: 4px solid #6b6a63; width: 800px; border-radius :12px; margin : auto; padding : 20px; position:fixed; } </style> <div id="popup" class="popup"> some lengthy text </div> <script type="text/javascript" src="code.jquery.com/jquery-1.7.1.min.js"></script> <script> $(document).ready(function(){ var popup_height = document.getElementById('popup').offsetHeight; var popup_width = document.getElementById('popup').offsetWidth; $(".popup").css('top',(($(window).height()-popup_height)/1)); $(".popup").css('left',(($(window).width()-popup_width)/2)); }); </script>



Răspunde cu citat