Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jan 2008
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Question Drop-down sections for content?

    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.ph...d=.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.).

  • #2
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    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 if you're new or jQuery 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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •