How to add an image to a html button (works in fbml too)

Web programming topics
Post Reply
User avatar
Saman
Lieutenant Colonel
Lieutenant Colonel
Posts: 828
Joined: Fri Jul 31, 2009 10:32 pm
Location: Mount Lavinia

How to add an image to a html button (works in fbml too)

Post by Saman » Sun Oct 03, 2010 5:38 pm

Simple method:

Code: Select all

<input type="image" src="https://robot.lk/styles/prosilver_se/imageset/ROBOT.LK-logo3.png" alt="Submit button">
CSS method:

Code: Select all

<input type="button" value="Give Me Instant Access Now" style="background: url('https://robot.lk/styles/prosilver_se/imageset/ROBOT.LK-logo3.png'); height: 50px; font-size: 30px; font-weight: bold;">
CSS method has more control. Both methods are working fine in fbml (At least on FBML test console).
User avatar
Face
Major
Major
Posts: 727
Joined: Thu Feb 18, 2010 5:06 pm
Location: SRI LANKA.KANDY.

Re: How to add an image to a html button (works in fbml too)

Post by Face » Wed Mar 02, 2011 9:06 am

Thanks saman.This thing works with FBML :)
Post Reply

Return to “Web programming”