By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,521 Members | 1,222 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,521 IT Pros & Developers. It's quick & easy.

How to I reveal a section of my page on the click of a button?

P: 1
I want to have a button that when clicked, reveals a section of my page including several images, text, tables, and some drop down menus. I want the page to start with that section hidden at first but other sections visible. Is there a code to do this? Ideally I would like to just drop the code into something simple like this:

When user clicks this button reveal the following [

here is where the code for all my images, text, tables, and drop down menus goes.


Please help. Thanks.
Nov 10 '08 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 15k+
P: 16,027
Yes, this is possible, but not with HTML/CSS. You need JavaScript. I can move this thread to the JavaScript forum for you.

Look into the style.display property. Set to "none", the content will be hidden. If you set it to "block" in your function called onclick, the content will show up. An alternative is the style.visibility property.
Nov 10 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.