Solved

dropdown always on top in ie6

Posted on 2011-03-24
8
399 Views
Last Modified: 2012-06-27

I cannot set the div to be on top of a dropdown in ie6. Works in other browser but not in ie6.

Z-order is not working.

Any ideas?
0
Comment
Question by:PagodNaUtak
  • 5
  • 2
8 Comments
 
LVL 40

Expert Comment

by:gurvinder372
ID: 35205421
0
 
LVL 13

Expert Comment

by:stergium
ID: 35205429
hello.
use the z-index attribute and the zIndex property to change the stacking order of objects.
<img src="cone.jpg"
    alt="cone"
    style="position: absolute;
        top: 100px;
        left: 100px;
        z-index: 4">
<div style="position:absolute;
    top: 100px;
    left: 100px;
    color: red;
    background-color: #999966;
    font-weight:bold;
    z-index: 1">
...
</div>
0
 
LVL 8

Author Comment

by:PagodNaUtak
ID: 35205471
Hi stergium,

your try an example with a dropdown or a select input type. it will not work... in IE6...

The problem occurs only in dropdown.
0
 
LVL 8

Author Comment

by:PagodNaUtak
ID: 35205516
IE6 sux. A div or ul with position:absolute. No matter how much you increase the value of z-index the select box (windowed element) will always remain on top most – yes only on a special browser, Internet Explorer 6. The reason is IE6 considers select element as windowed element and keeps it always on top layer.
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 40

Expert Comment

by:gurvinder372
ID: 35205546
Not sure why do you have to support IE6. Do people still use it?

Also, did you tried wrapping your div into another div and then giving it z-index? the link that i shared earlier seems to suggest that it works
0
 
LVL 8

Author Comment

by:PagodNaUtak
ID: 35205630
Actually that is the first thing that comes to my mind. unfortumately, yes, someone still using it and mostly our executives. I do not know the reason why they are still using it.
0
 
LVL 8

Accepted Solution

by:
PagodNaUtak earned 0 total points
ID: 35255490
Set the css display none to hide it and display inline to show it.
So that the dropdown will not be on top if the div is visible..
0
 
LVL 8

Author Closing Comment

by:PagodNaUtak
ID: 35312539
As stated in the comment
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Adding a menu section 13 35
CSS not updating in FF and ipad 6 41
Inline input fields - Contact Form 7 5 21
Help cleaning out CSS 2 29
Unordered lists (HTML ul tags) are very handy to create menus of all types, shapes and sizes.  All it takes is a little knowledge of CSS and the possibilities are endless. First off, you should know the general format for menus created using the …
Creating a CSS block that only applies to printing By default, all of your CSS applies to every possible view of your page - whether on screen, printed, landscape, touch-screen, or whatever.  You can, however, add CSS that only applies under certai…
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now