can I have a transparent button in html?

Posted on 2009-02-12
Last Modified: 2013-11-19

Can I have a transparent button in html that overlays a bunch of things, but when the user clicks anywhere within the button area it triggers the click event?

Question by:ugeb
    LVL 39

    Expert Comment

    by:Roger Baklund
    You can put a "normal" <a> </a> around a bunch of things, but it might depend an what that "bunch of things" is... can you show us the relevant html?
    LVL 39

    Accepted Solution

    You can also surround the content with a div, and have an onclick event on the div. That would be a js only approach, while the <a></a> approach also works with js disabled.
    LVL 2

    Assisted Solution

    you can use css opacity by adding:


    to the element the works as a button

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
    Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
    In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
    The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now