img.bg { /* Set rules to fill background */ min-height: 100%; /* Set up proportionate scaling */ width: 100%; height: 100%; /* 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->addSurvey($name, $roll, $hall, $hallinfra, $faca, $gymkhanac, $gymkhanas, $ihi, $mnm, $iha, $pic, $sip, $sev, $fsio, $penca, $uic, $iitsm, $usf, $uis, $suggestions); $msg = "Entry registered"; echo '<img src="images/survey_th.jpg" class="bg">'; ?> </html>