Jump to content

Setting The Height Of A Fieldset In Which Elements Have Been Hidden


Recommended Posts

I am messing around with some little fun features with jQuery. One of them is for the account information page. It is split into four fieldsets, each containing its own set of fields with labels and a submit button. For javascript enabled users, I have added a few lines that hide the labels, buttons and inputs in each label and a button to open and close each section for viewing and editing. However, when the fields are missing, the fieldset does not collapse to an appropriate size and nothing I can do seems to make it shrink. Here is a sample page:registration formI know this is not a practical idea for every form, but so far it works on them all. I will locally import this function for the pages I want it on, but for now this page works as a sample without having to register and sign in.Okay, setting the height works, it's the fact that the enable/disable buttons then disappear that is the problem. Fieldsets don't seem to be containers as such for me to style against...Edit: Okay, I just put the toggle buttons at the top - easier to use anyway since you don't need to hunt for the button at the bottom of the fieldset if you want to open a closed section.

Edited by chibineku
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...