User97798 User97798 - 1 year ago 104
CSS Question

After using z-index then why showing background object in html

I am making a popup to show some preload stuff but when but is not working. it is showing other element.

<script src=""></script>
<script src=""></script>
<link rel="stylesheet" type="text/css" href="">
jQuery(document).ready(function() {
jQuery('body').append('<div id="pbwrapper" style="width: 100%; position: fixed; left:0; top: 0; opacity:1; height: 800px; margin: 50px auto 0px auto; text-align: center; z-index: 10000; background-color : #fff;" > <h1 class="headline tac sans-serif">Wait while we loading Awesomeness</h1> </div>');
}, 9000
<div id="wrapper">This is wrapper</div>

That popup is created dynamicly by using jquery.

I made change in id="wrapper".

Is there any thisg wrong in my css. I fixed position of popup.
this is screenshot here enter image description here

Answer Source

You have done a mistake in the jQuery like There is you have give the margin so remove it or just make it 0 and other thing @Vinayak is right make height =100%

Make Changes in this line

height: 800px; margin: 50px auto 0px auto;


height: 100%; margin: 0;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download