I have noticed a number of accordion-type jquery plugins lately which drop down to reveal extra content. I am exploring jquery in detail at the moment but I feel that some of my css positioning knowledge must be expanded upon first and this is one of the things that bothers me regulalry.
So my question is, what type of positioning would you use for eg. a drop down tab div which is positioned inside a parent div and when you click on it, the tab expands revealing extra content but also forcing the parent div to increase in size to compensate for it? Also what would you set the css overflow property to in order for this to happen?
So my question is, what type of positioning would you use for eg. a drop down tab div which is positioned inside a parent div and when you click on it, the tab expands revealing extra content but also forcing the parent div to increase in size to compensate for it?
Hi,
As long as your not setting fixed heights on the parent you sould not have anything to be concerned about. The parent will expand according to it’s content.
Also what would you set the css overflow property to in order for this to happen?
You might need overflow:hidden; on the parent to enclose floated children but it will not cause any height restrictions as long as you don’t set a fixed height.