Results 1 to 2 of 2

Thread: Overflow: hidden .... ah, really???

  1. #1
    Join Date
    Nov 2010
    Posts
    24
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Smile Overflow: hidden .... ah, really???

    Hello everyone,

    A real quick one this:

    How is it possible to have a <div> with:

    overflow: hidden; PLUS position: absolute;?

    Currently, positioning it absolutely brings the scrollbar back, which is unwanted.

    Please help.

    Many Thanks.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    An element with position absolute has an intrinsic width and height of 0, unless set otherwise. So depending upon what you put in it and how, there could be scrollbars. Or perhaps apparently nothing if its overflow is hidden.

    If you set its width and height to 'auto', it should take on the dimensions of its content. But if there's a nested element inside it, that element might have scrollbars. Or if it's contained in a positioned element, perhaps not even a positioned one, that element might have scrollbars.

    These things tend to be interdependent. And there could be slightly different takes on it depending upon the browser.

    If you want more help:

    Please post a link to a page on your site that contains the problematic code so we can check it out.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •