Make Connections

Network, Get Answers, Find Members in Your Area, and More!

Forums » Building a Website that Works

set image with button?

    • 1 posts
    March 11, 2013 3:54 AM EDT

    Hi Noah,

    There are a number of ways to do this - 

    1- Using CSS

    Example - 

    In the <head> HTML code of your page

    <style type="text/css">

    .link { background:url(path to your image) no-repeat;




    Then in the <body> section where you want the image to appear

    <div class="link><a href="link to your page">&nbsp;</a></div>


    Using the 'a' tag

    Simply use this

    <a href="link to your page"><img src="path to your image"></a>


    Hope this helps

    • 139 posts
    March 11, 2013 2:41 AM EDT

    Hello Guys,

    Please suggest me html code for set button background image.

    thank for any suggestion.

    Machine Cargo Moving | Commercial and Business Removals

    • 37 posts
    March 14, 2013 2:32 AM EDT


    You can also try this

    <inputtype="button"value="Add a new row"class="button_add"/>
    input.button_add { background-image: url(/images/buttons/add.png);/* 16px x 16px */ background-color: transparent;/* make the button transparent */ background-repeat:no-repeat;/* make the background image appear only once */ background-position:0px0px;/* equivalent to 'top left' */ border: none;/* assuming we don't want any borders */ cursor: pointer;/* make the cursor like hovering over an <a> element */ height:16px;/* make this the size of your image */ padding-left:16px;/* make text start to the right of the image */ vertical-align: middle;/* align the text vertically centered */}

    Wordpress Development Company | Wordpress Development Service