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
  1. #1
    New Coder
    Join Date
    Jul 2010
    Posts
    47
    Thanks
    0
    Thanked 0 Times in 0 Posts

    WEB PAGE CONTENT SCROLLING OVER DIV WITH CSS FIXED POSITION property

    Trying to set z-index CSS property to prevent web page content from scrolling over "BANNERADS" div which has fixed position. Not successful so
    far , can you tell what value to assign and possibly why it is not working.



    #BANNERADS{
    position : fixed;
    Z-index : 3000;
    top : 5PX;
    left : 600;
    width : 300PX;
    }

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,667
    Thanks
    22
    Thanked 1,826 Times in 1,810 Posts
    Hello rleahong,
    Hard to say what's going wrong there without seeing more code. The bit of CSS you've posted is invalid and we have no idea what else could be wrong...

    Look at it this way -
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <style type="text/css">
    html, body {
    	margin: 0;
    	background: #fc6;
    }
    #bannerads {
    	height: 50px;
    	width: 300px;
    	position: fixed;
    	top: 5px;
    	left: 600px;
    	z-index: 1;
    	background: #0f0;
    }
    #container {
    	height: 4000px;
    	width: 800px;
    	margin: 55px auto;	
    	background: #fff;
    }
    </style>
    </head>
    <body>
    	<div id="bannerads"></div>
        <div id="container">
        <!--end container--></div>
    </body>
    </html>
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #3
    New Coder
    Join Date
    Jul 2010
    Posts
    47
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Before I get any further with this, the full information you requested on post
    http://www.codingforums.com/showthre...75#post1299075 with
    regarads to DIV within a container div out of algnment is now there waiting for you
    to read it.


  •  

    Posting Permissions

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