简体   繁体   中英

IE7: display problems

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?

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM