I want to create a simple full-screen overlay with loader and text in the center. I have some problems with the text. I want the image to be over ABOVE the text. Can you help me with this?
<div id="loadingOverlay" class="loader-overlay">
<div class="loader-content loader-center">
<img src="http://www.mysarkarinaukri.com/images/loadingBar.gif" class="loader-center" alt=""/>
<div class="loader-center loader-text">Loading, please wait...</div>
</div>
</div>
http://jsfiddle.net/bLz7wgvs/2/
[edit]
Sorry for my English. I meant "above", not "under"...
It should look like:
[-------------loader here-------------]
Loader text (plz wait, etc.) in one line, both centered horizontally and vertically
Try this,
Ive added z-index to the image and loader text :)
Edit
I didn't know you wanted to let the image appear above the text. I've changed your code a little bit: http://jsfiddle.net/bLz7wgvs/7/
CSS:
You just need to add a
z-index
to the image (and the associated class required to the HTML element):http://jsfiddle.net/bLz7wgvs/4/
Otherwise, you can just replace the order of the elements in the DOM if you have control over this. Siblings will appear above other siblings if they appear after them in the DOM tree As stated in the spec:
So you can just change the markup to:
http://jsfiddle.net/bLz7wgvs/6/