iWeb FAQ - Toggle, Hide and display


iWeb FAQ     Webmaster     Wish List     Guestbook     Forum     E-Books


How can I add some content to my page which is hidden when the page loads and displays when people click on a link?

La stessa pagina in italiano                             Die gleiche Seite auf Deutsch


Hide/Display also referred to as toggle or toggle switch is usually used to have some content on a page which shows only when people hit a link. The classical way to use it is:

What are the best sources for FAQ, Tutorials, Tips & Tricks about iWeb? (show)

either to display some text, photos and images, a bunch of links or whatever.

The code uses <div> (containers) to hide/display their content. You can set each div to display either right after the link as in the example above or you can set each of them to display in another part of the page or (as in the example below) have them all displaying in the same area.

Here I used it to embed various YouTube videos and have a menu on the left from which you can choose what video you would like to see

Of course it also works to display anything else.

Please note that I don't recommend using this method for search engines relevant content (content which you use to attract people to your site) since it's not clear whether they read the hidden content or not. So don't use it to build your entire website. However I see no reason why you shouldn't use this on content which is not so search engines relevant like YouTube videos you embed, just display some photos or text, ...

Example of how I used it in my music popup

The only problem using this in iWeb is that iWeb's pages are fixed length so they don't adapt in length if new content expands. This means that you have to give it enough room for the content to display once expanded.

Here's another example with mixed contents. Note that all the content here is in a single HTML Snippet (could also be added via Alternative HTML)

How this is done is described on my iWebFAQ.org E-Book (sample)

iWebFAQ.org - Tutorials, Tips & Tricks is made with iWeb and for iWeb.

It’s an EBookStoreToday.com company. It’s presented by Cédric Giger and hosted by HostGator.

Thank you for visiting and supporting my website,

- Cédric -