...

View Full Version : Drop-down sections for content?



Cycleswithin
01-19-2008, 04:45 PM
For my site which i'm building - http://www.josephlavington.com

...I was wondering if it would be possible to only display 5 items under each heading (as there are under the first section), but to have a 'Show All' function whereby the section expands to reveal other entries.

Does that make sense? The only example I could remember is on a domain search site: https://www.34sp.com/order-domain.php?domain=billgates&tld=.com&flash=1
If you click on say 'North American Domains' it shows all the entries in that section. This is a similar functionality to what i'd like to achieve.

So - is this possible, and would you recommend it? And if so, with CSS/HTML in a proper way that conforms to proper standards (ie. I don't really want tables, Flash etc.).

rmedek
01-19-2008, 07:36 PM
Yes, it's certainly possible, but not with HTML and CSS only. HTML is only a markup language (says what the content is); CSS is a presentational language (says how the content looks).

If you want the content to do something, you need a behavioral language, in this case, Javascript.

There's a few lightweight frameworks that have this sort of thing built right in; try Mootools (http://mootools.net) if you're new or jQuery (http://jquery.com) if you've got a handle on Javascript already. If you want to "roll your own" I'll move this to the JS forum for you.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum