Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: layer

  1. #1
    Regular Coder
    Join Date
    Aug 2005
    Posts
    257
    Thanks
    8
    Thanked 0 Times in 0 Posts

    layer

    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

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,852
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Read the answer from the sticky thread http://www.codingforums.com/showthre...173#post182173
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    Regular Coder
    Join Date
    Sep 2007
    Location
    Raleigh, NC
    Posts
    273
    Thanks
    7
    Thanked 59 Times in 52 Posts
    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>

    CSS:

    Code:
    #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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •