img.bg { /* Set rules to fill background */ min-height: 100%; /* Set up proportionate scaling */ width: 100%; height: auto; /* Set up positioning */ position: fixed; top: 0; left: 0; } #page-wrap { position: absolute; width: 50%; max-height:60%; margin: 30% auto auto 10%; padding: 20px; background: white; -moz-box-shadow: 0 0 20px black; -webkit-box-shadow: 0 0 20px black; box-shadow: 0 0 20px black; overflow:auto;} p { font: 15px/2 Georgia, Serif; margin: 0 0 30px 0; text-indent: 40px; } </style> </head> <body> <?php $rs = $objDB->addPledge($name, $degree, $department, $hall, $year, $amount, $time, $duration, $phone1, $phone2, $email1, $email2, $address1, $address2, $city, $state, $country, $zip, $spouse_name, $spouse, $mentorship, $batch_campaign, $gift, $remark); $msg = "Entry registered"; echo '<img src="images/bg_pledge2.jpg" class="bg">'; ?> </html>