March 2, 2010

Microsoft’s AjaxToolKit is a very handy thing to have for any ASP.NET developer. However, one of my biggest problems with it is that I have encountered problems in IE6. The position of the modal appears way off center. After doing a little research, I’ve found the best way to solve this is to wrap the panel that you’re using for the modal in a div with a style of “position:relative;_z-index:1” (it’s important to note the underscore in front of z-index. This targets IE6 specifically). You can also give the div a class and set the z-index in a separate IE6 stylesheet if you want to still keep your CSS valid. Here is an example of this fix in action: