Results 1 to 2 of 2

Thread: Close DIV On Image Click - Please Help

  1. #1
    Join Date
    Aug 2007
    Location
    MO USA
    Posts
    106
    Thanks
    37
    Thanked 0 Times in 0 Posts

    Default Close DIV On Image Click - Please Help

    Please see the below code. When i click on the close image, the collapseWindow div should be hidden and the rightColumn should occupy the area. When i click on the image again, the collapseWindow DIV should Show as on the default view and rightColum should go back to its original width.

    Please Help.

    HTML Code:
    <html><head>
    <style>
    #wrapper{width:100%;}
    #leftColumn{width:25%; float:left; background-color:#CCCCCC;}
    #rightColumn{width:75%; float:left; background-color:#6699FF;}
    </style>
    </head>
    <body>
    <div id="wrapper">
    	<div id="leftColumn">
    	<table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="50px"><a href="#"><img src='http://www.totaltutorials.com/img/thumb/1690.jpg' width=50 height="50" border="0" ></a></td>
            <td>
    			<div id="collapseWindow">this div should be hidden and the rightColumn should occupy this area </div>
    		</td>
          </tr>
        </table>
    	</div>
    	<div id="rightColumn">
    	  <p><br>
    	    Right Column <br>
    	  &nbsp;</p>
        </div>
    </div>
    </body>
    </html>

  2. #2
    Join Date
    Aug 2007
    Posts
    17
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    Hi,

    This example should fullfill your JavaScript needs, however you may like to repost any question about layout in the CSS forum.

    http://www.theredplanet.org/examples...age_click.html

    Ryan

Bookmarks

Posting Permissions

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