Thursday, May 21, 2026

Website pop up box using HTML

 <!DOCTYPE html>

<html lang="en">

<head>

   


    <style>

       


        /* Popup Background */

        .popup{

            display: flex;

            position: fixed;

            top: 0;

            left: 0;

            width: 100%;

            height: 100%;

            background: rgba(0,0,0,0.6);

            justify-content: center;

            align-items: center;

        }


        /* Popup Box */

        .popup-content{

            background: #fff;

            width: 350px;

            padding: 25px;

            border-radius: 10px;

            text-align: center;

            position: relative;

            box-shadow: 0 0 15px rgba(0,0,0,0.3);

        }


        .popup-content h2{

            color: #007bff;

            margin-bottom: 10px;

        }


        .popup-content p{

            margin-bottom: 20px;

        }


        .admission-btn{

            display: inline-block;

            padding: 10px 20px;

            background: #28a745;

            color: white;

            text-decoration: none;

            border-radius: 5px;

            font-size: 16px;

        }


        .admission-btn:hover{

            background: #218838;

        }


        /* Close Button */

        .close{

            position: absolute;

            top: 10px;

            right: 15px;

            font-size: 22px;

            cursor: pointer;

            color: red;

        }

    </style>

</head>

<body>


    <!-- Popup -->

    <div class="popup" id="popupBox">

        <div class="popup-content">

            <span class="close" onclick="closePopup()">&times;</span>


            <h2>Admission Open 2026</h2>


            <p>

                Apply now for admission and start your career journey with us.

            </p>


            <a href="https://youradmissionlink.com" 

               target="_blank" 

               class="admission-btn">

               Apply Now

            </a>

        </div>

    </div>


    <script>

        // Close Popup Function

        function closePopup() {

            document.getElementById("popupBox").style.display = "none";

        }


        // Popup automatically opens when website loads

        window.onload = function () {

            document.getElementById("popupBox").style.display = "flex";

        };

    </script>


</body>

</html>

No comments:

Post a Comment

QR CODE GENERATOR

 https://chromewebstore.google.com/detail/qr-code-generator/afpbjjgbdimpioenaedcjgkaigggcdpp?hl=en