Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

bootstrap click to call

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>
like image 697
jayers Avatar asked Sep 05 '14 02:09

jayers


1 Answers

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>
like image 133
drneel Avatar answered Nov 02 '22 23:11

drneel