views:

40

answers:

2

I have a fieldset- let's call it "foo"- in a form that is conditionally displayed based on whether a checkbox is checked or not. If the checkbox is clicked, then a javascript function is called which sets the display property of "foo" to "block" or "none".

In IE8 and FF a displayed "foo" correctly causes the fieldset below it to move down in the flow of the page and make space for "foo". However, in IE7, when "foo"'s display property is "block", it displays directly on top of the fieldset below it.

Why would this be happening?

+1  A: 

This isn't exactly an answer to your specific question, but are fieldsets able to have an empty string as their display property? If so, try using that rather than 'block'. Dunno if that helps at all.

JAB
No, it didn't help :(
dmr
+2  A: 

What is the display style of all of the other fieldsets? What I mean is, in FF or IE or whatever, inspect them and see what the computed style is for display for them. That may give you/us some further insight into what is happening.

Oh, also check the positioning type attributes, just for giggles.

Matt Dawdy
This set me on the right track...I realized that the fieldset was moving but the elements within were not. I set their position style to static and now everything works...Thanks!
dmr
No problem, dmr! Glad you were able to track it down.
Matt Dawdy