Jump to content

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


chibineku

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.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...