View Full Version : layer

11-01-2007, 11:47 AM
how i can create a layer over my page(width and height same to my principal page) with the text: "you don not have access to this page" with a background image called nonei.png... This is for protect some areas of my page. Regards :thumbsup:

11-01-2007, 12:50 PM
Read the answer from the sticky thread http://www.codingforums.com/showthread.php?p=182173#post182173

11-01-2007, 03:33 PM
I think he's after something to protect his page from a permissions stance, not a source code stance so I'm not sure that link applies.

To do what you're asking though you just need a div that is absolutely-positioned and a high z-index.

Something like this:

<div id="lockedout">You do not have access to this page.</div>


#lockedout {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
background: #333 url(nonei.png) center center no-repeat;
text-align: center;
padding-top: 60%;
z-index: 1000;

I'm only guessing how big the nonei.png image is or where you'd want to position the text, but you get the idea.