1

Here's the link: http://jsfiddle.net/smnde/2/

Is there a way to make the list show up above the div when overflow:auto is set? Like in the second container?

3
  • 1
    Don't use overflow:auto? Commented Oct 17, 2011 at 8:18
  • I'm using this inside a modal window, so I need the vertical scroll. Commented Oct 17, 2011 at 8:23
  • Ah, just seen the answers and understand the question better now.. Commented Oct 17, 2011 at 9:59

2 Answers 2

4

yes; you can display overflow div outside of anything div when the child is absolute position & it's parent didn't have position:relative

like this:

#button {
    border: 1px solid #999;
    margin: 5px;
}

#hidden {
     display: none;
    position: absolute;
    margin-top:-20px;
    left:190px;
    width: 50px;
    border: 1px solid #333;
}

check this http://jsfiddle.net/sandeep/smnde/26/

Sign up to request clarification or add additional context in comments.

5 Comments

Correct me if I'm wrong, but this will break if any parent object is positioned. Since the container is part of a modular window its not possible to use this.
about position i already define it . This trick is not use first time. We can use them without any problem. You can sreach in google
What I mean is that you can't use any position directive on any parent of the box... Check: jsfiddle.net/smnde/27
You both get ups but I gotta give it to sandeep. I used .position() instead of .offset() in order to position my list (each row has a similar list on mouseOver). Thank you both!
@sandeep Is there a way to make the child appear at the same level of the parent. Your solution is great, but the child can only be at a fixed position.
2

No, overflow will not display anything outside the box.

You can use a tooltip like hover instead with the hidden box outside the container.

Check: http://jsfiddle.net/smnde/9/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.