1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Conflict with Facebook "Like Button" and Clickable Phone Numbers for Mobile Devices?

Discussion in 'HTML & JavaScript' started by truelux, Apr 5, 2013.

  1. truelux

    truelux Regular Member

    Joined:
    Jun 16, 2011
    Messages:
    298
    Likes Received:
    91
    Not sure what's going on but as of now if I have the following code on my site:

    Code:
    <div id="likebutton"><iframe scrolling="no" frameborder="0"  src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.facebook.com%2Ffacebook&send=false&layout=button_count&width=100&show_faces=false&action=recommend&colorscheme=light&font=tahoma&height=21&appId=278942345449142"  style="border:none; overflow:hidden; width:135px; height:21px;"  allowtransparency="true"></iframe></div>
    a simple number

    Code:
    <p>123-456-7890</p>
    This number becomes unclickable when viewed on a mobile device (Android). I know this code is 100% at fault because when I remove it I can click on a phone number and it will automatically be inputted on my cell phone. I tried all their code options but all of them conflict?
     
  2. shindig

    shindig Registered Member

    Joined:
    Aug 2, 2012
    Messages:
    62
    Likes Received:
    9
    Occupation:
    Programmer
    Location:
    Seattle, WA
    Home Page:
    For the cell phone part:

    Code:
    <a href="tel:5555555555">555-555-5555</a>
     
  3. truelux

    truelux Regular Member

    Joined:
    Jun 16, 2011
    Messages:
    298
    Likes Received:
    91
    I can use that but then it will look odd when viewed on a desktop/tablet and wouldn't function.

    Unless there's a way to make that link turn on/off depending on resolution size?
     
  4. shindig

    shindig Registered Member

    Joined:
    Aug 2, 2012
    Messages:
    62
    Likes Received:
    9
    Occupation:
    Programmer
    Location:
    Seattle, WA
    Home Page:
    You can style the link with CSS...text-decoration:none;color:black; Otherwise yea you'd have to get a script to sniff the browser.
     
    • Thanks Thanks x 1
  5. truelux

    truelux Regular Member

    Joined:
    Jun 16, 2011
    Messages:
    298
    Likes Received:
    91