SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    May 2007
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Max size of a box, then scroller

    Hi,

    I have this in my style.css:
    PHP Code:
    #content {
        
    floatleft;
        
    width480px;
        
    height100px;

    And in the .php file:
    PHP Code:
    <div id="content">
        <
    p>Content here</p>
    </
    div
    When the content in that box is enough to pass by the 100px of height I want a scroller. In fact the box always have to be 100px of height.
    Can someone help me with this?

    Cordially,
    Johan

  2. #2
    Twitter - @CarlBeckel busy's Avatar
    Join Date
    May 2004
    Location
    Richmond, VA, USA
    Posts
    819
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This belongs in the CSS forum.

    I believe what you need is
    Code:
    #content{
      float: left;
      width: 480px;
      height:100px;
      overflow:scroll;
    }

  3. #3
    SitePoint Member
    Join Date
    May 2007
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you that's working. But how to disable the buttom scroller? Because it's visible even when it's not necessary.

  4. #4
    Twitter - @CarlBeckel busy's Avatar
    Join Date
    May 2004
    Location
    Richmond, VA, USA
    Posts
    819
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you can try
    overflow:auto
    but I think that's the default... maybe it will work right though...

  5. #5
    Twitter - @CarlBeckel busy's Avatar
    Join Date
    May 2004
    Location
    Richmond, VA, USA
    Posts
    819
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i think there are also
    overflow-x:
    and
    overflow-y:
    but they definitely don't work in too many browsers.

  6. #6
    SitePoint Member
    Join Date
    May 2007
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by busy View Post
    you can try
    overflow:auto
    but I think that's the default... maybe it will work right though...
    That's works great!!
    Thanks


Bookmarks

Posting Permissions

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