• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1222
  • Last Modified:

can I have a transparent button in html?

Hi,

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?

Thanks!
0
ugeb
Asked:
ugeb
  • 2
2 Solutions
 
Roger BaklundCommented:
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?
0
 
Roger BaklundCommented:
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.
0
 
basselkhCommented:
you can use css opacity by adding:

style="opacity:0.4;filter:alpha(opacity=40)"

to the element the works as a button
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now