www.webdeveloper.com
Results 1 to 6 of 6

Thread: What does define overflow: auto; ?

  1. #1
    Join Date
    Sep 2005
    Posts
    1,628

    Question What does define overflow: auto; ?

    What does define overflow: auto; ?

  2. #2
    Join Date
    Apr 2008
    Posts
    59
    http://www.w3schools.com/Css/pr_pos_overflow.asp

    That should explain all overflow properties

    AUTO = 'If overflow is clipped, a scroll-bar should be added to see the rest of the content'

  3. #3
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    If a parent container nests an oversize ("clipped") child element, that parent, with an overflow:auto, will gain a scroll bar. If not, not.
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <title>untitled</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta http-equiv="Content-Style-Type" content="text/css">
    <meta http-equiv="Content-Script-Type" content="text/javascript">
    <style type="text/css">
    .container {
    width:200px;
    height:100px;
    border:1px solid #000;
    margin-bottom:10px;
    overflow:auto;
    }
    .kid {
    background:#ccc;
    }
    </style>
    </head>
    <body>
    <div class="container">
    	<div class="kid">
        Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam tellus sem, malesuada nec condimentum sed, tincidunt vel lectus. 
        </div>
    </div>
    <div class="container">
    	<div class="kid">
        Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam tellus sem, malesuada nec condimentum sed, tincidunt vel lectus. Maecenas eu est quam, vitae aliquet augue.
        </div>
    </div>
    </body>
    </html>

  4. #4
    Join Date
    Sep 2005
    Posts
    1,628
    What will happen in conjuction with
    overflow: auto;
    width: 100&#37;;

  5. #5
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    Quote Originally Posted by toplisek View Post
    What will happen in conjuction with
    overflow: auto;
    width: 100%;
    Nothing special. Why?

  6. #6
    Join Date
    Jul 2009
    Posts
    35
    Quote Originally Posted by toplisek View Post
    What will happen in conjuction with
    overflow: auto;
    width: 100&#37;;
    depends if if you have a padding on the parent container in which your element will try to expand 100%, in which case will overflow hence the scrollbar will appear.
    Last edited by charlitos; 11-17-2009 at 01:42 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles