3

I have a strange issue with the z-index of an element not getting set even when I put a position:absolute on it. The parent element has overflow:hidden set.

TO see an example of what I mean:

  1. Go to http://www.berrisforda.com/
  2. On the job search tab there is a custom select/dropdown hover over it
  3. Notice that it get cut off by the container, it actually extends below it but the container has overflow:hidden set

I am trying to set a z-index on it but haven't had any luck

Can anyone help please?

2 Answers 2

5

In this case, z-index won't help you. If you have overflow:hidden on a parent element, any child outside of that element's bounding box will be hidden. You have three options:

  1. Move the drop down element so that it is no longer a child of the overflow:hidden element.
  2. Make the drop down list scroll.
  3. Remove the overflow:hidden style.
Sign up to request clarification or add additional context in comments.

Comments

1

Adjust the hieght on your .tab to be shorter...

ul#output li.tab {
position: absolute;
width: 684px;
height: 345px; /*see how I changed this value*/
background-color: #fff;
}

And remove overflow:hidden from #feature-list{}

And set the z-index:1 on .dropdown dd ul {}

Do the following step too to fix you footer....

Sorry Burt - I made a mistake initially - here is the final step

Remove position:relative and z-index from #footer

Then you should be good to go!

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.