www.webdeveloper.com
Results 1 to 2 of 2

Thread: Multiple clicktags in one banner

  1. #1
    Join Date
    Sep 2005
    Location
    Norway
    Posts
    23

    Multiple clicktags in one banner

    Hi

    I am making a banner with 2 buttons, one that will cover the whole banner and one that will have its own url. Can not find out how to do this. Can anyone help me

  2. #2
    Join Date
    Mar 2007
    Location
    Orlando
    Posts
    670
    You can position your elements to overlap. Don't nest them because your javascript events would bubble up and you would end up having both elements handle the onclick. You can do something like this. You should be able to do the same with images.

    HTML Code:
    <html>
    <head>
    
    </head>
    <body>
    	<div style="width:100&#37;;background-color:black;height:50px" onClick="alert('large')">
    		
    	</div>
        <div style="position:fixed;top:20px;right:200px;height:20px;width:40px;background-color:white" onClick="alert('small')">
            Small
        </div>
    </body>
    </html>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles