#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    1
    Rep Power
    0

    Cann't scroll the content


    I am new with css, and try to make the header static and the content able to scroll (i use chrome, should work in other browsers as well of course)

    I have this :

    <style>
    body{
    margin: 0;
    font-family: Verdana, sans-serif;
    font-size: 0.8em;
    }

    div#header{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background-color: #CCC;
    z-index: 100;
    }




    /* IE only */

    * html body{
    overflow: hidden;
    padding: 100px 200px 0 0;
    }

    * html div#header{
    position: absolute;
    }



    * html div#content{
    height: 100%;
    overflow: auto;
    padding: 10px 20px 0 20px;
    }
    </style>


    the header is perfectly sticked to the top, but the conten isn't allowed to scroll, how do I make that working?

    thnx
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2011
    Location
    The Pleiades
    Posts
    299
    Rep Power
    9
    Good evening Lexmoen,

    Give this a try:
    Code:
    * html div#content{
    height: 100%;
    overflow: scroll;
    padding: 10px 20px 0 20px;
    }
    It's hard to say with no HTML otherwise I would have put it into a text file and debugged it properly.

    Hope it helps though.

    Kind regards,

    NM.

IMN logo majestic logo threadwatch logo seochat tools logo