6

I am trying to insert a click to call button on my home page. This is the first site I've built using Bootstrap (Bootstrap 3.2.0).

Please view the code and help me figure out what I'm doing wrong. Thank you

You can visit the site here.

<button type="button" class="btn btn-primary btn-xlg" href="tel:713-992-0916" style="padding:20px;background-color:rgba(0,0,238,.5)">
    Click to Call <span class="glyphicon glyphicon-earphone" style="padding-left:10px; padding-right:10px;"></span>713-992-0916
</button>
drneel
  • 2,887
  • 5
  • 30
  • 48
jayers
  • 71
  • 1
  • 1
  • 4
  • 1
    Hello! Could you clarify what exactly you expect to happen and what is happening instead? That'll help us better answer your question. Thanks :) – MatthewSot Sep 05 '14 at 02:52

1 Answers1

17

It is not working because you have invalid HTML (an href attribute on a button). Usage info from W3C

This should do the trick:

<a class="btn btn-primary btn-xlg" href="tel:713-992-0916" style="padding:20px;background-color:rgba(0,0,238,.5)">
   Click to Call <span class="glyphicon glyphicon-earphone" style="padding-left:10px; padding-right:10px;"></span>713-992-0916
</a>
drneel
  • 2,887
  • 5
  • 30
  • 48