Find us elsewhere
Join Now Member Login

set image with button?

 
New Topic
Post Reply
Follow Topic
Page of 1
  • Author
  • Message
 
noahwilson

posts: 153

Mar 11, 2013 6:41 AM ET    Quote  Report Abuse
Points: 0   Vote

Hello Guys,

Please suggest me html code for set button background image.

thank for any suggestion.



-------------------------

Thanks & Regard
Noah Wilson (Australian Vanlines)
Machine Cargo Moving | Commercial and Business Removals | Moving To Canberra
UKFranchisor

posts: 1

Mar 11, 2013 7:54 AM ET    Quote  Report Abuse
Points: 0   Vote

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;

}

</style>

 

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



-------------------------

Mar 14, 2013 6:32 AM ET    Quote  Report Abuse
Points: 0   Vote

Hello,

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
Page of 1
Post Reply
 
.
Advertisement

Keep the Community Clean!

  • StartupNation forums should be used as a platform to learn, educate others, share stories, tips & tricks and to provide constructive feedback.
  • Please do not use the Forums for advertising & blatant self-promotion.
  • Please be respectful to other members and refrain from personal attacks and vulgar language.
  • StartupNation reserves the right to delete any message, reply, and/or member who violates our terms of use.
Read full terms of use
Advertisement
Advertisement
Advertisement
Advertisement