How to Make a Collapsible DIV in CSSby Finn McCuhil
Use collapsible DIV tags to enable visitors to your website to read additional content without being forced to leave the current page. These tags allow you to create a page with numerous expandable headings that let users view only the details they are interested in without wading though long pages of text. Quicker searches make your site more user friendly and enhance its value to your visitors as a reference tool.
Create a "
" tag. In this script, clicking the left mouse button activates the link. Place this code directly beneath the previous line: Click to Expand
- In this example, the text “Click to Show or Hide” is displayed with the properties assigned to the "" tag. The first time the user clicks the text, the message “Popup text”, “How does this look?” displays on the screen with a carriage return in place of the comma. The message disappears when the user clicks the tag a second time.