Background Image for Input Button with CSS (works in both Firefox and IE) « This part of my life is called: Being Myself

Background Image for Input Button with CSS (works in both Firefox and IE)

Posted on September 6, 2008 by Balaji Ramesh

I was having trouble with setting a background image for an input button in IE 6. The background-image property that worked in Firefox 2.0 just did not have any effect on IE6. After a bit of googling, I realized that the background-image property will not work on IE and that we need to use the background property. Here’s a snippet that works on both browsers:

.button{
background: white url(‘images/imagebutton.gif’) no-repeat top;
width: 150px;
height: 40px;
color:white;
}

via Background Image for Input Button with CSS (works in both Firefox and IE) « This part of my life is called: Being Myself.

Tags:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.

Join 178 other followers