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
    Oct 2010
    Posts
    48
    Thanks
    10
    Thanked 0 Times in 0 Posts

    Need div to start hidding oveflow behind -30px!?

    Hi

    I need a div tag with overflow style hidden, but to start hide beyond , for example -30px from top?

    Is that possible?

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,749
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    Hello bloody86,
    Not sure exactly what you're after...
    does this come close?

    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 {background: #FC6;}
    #container {
    	width: 800px;
    	margin: 30px auto;
    	background: #999;
    	overflow: auto;
    }
    #hidden {
    	height: 100px;
    	width: 400px;
    	margin: -30px auto 0;
    	background: #ff0;
    	overflow: hidden;
    }
    #tall {
    	height: 600px;
    	width: 50px;
    	background: #000;
    }
    </style>
    </head>
    <body>
    <div id="container">
        	<div id="hidden">
            	<div id="tall"></div>
            <!--end hidden--></div>
        <!--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
    Oct 2010
    Posts
    48
    Thanks
    10
    Thanked 0 Times in 0 Posts
    Code:
    <div id="txtarea" style="-30px auto 0; position: absolute; left: 610px; top: 232px; height:454px; width: 300px;overflow:hidden;">
    
    <p align="justify" class="drag" id="1" style="position:absolute; margin:0; top: 0px; width:260px; z-index: 2; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold; color: #000;">
      If you have an interesting related post on your own site you can leave a trackback.
      </p>
    </div>
    Here is what I need.
    I need this paragraph to remain on top 0px position and latter javascript move it to -50px to hide it, between 0px and -50px I want to insert half faded image to make fading effect of text while it's moving up!

    I hope you can understand me!

    Basicly I want to move overflow top border not to be on 0px but on -30px!
    Last edited by bloody86; 11-11-2010 at 10:07 PM.


  •  

    Posting Permissions

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