Using an image as a background for a button, how would I do this?
also, how would I link a button to a url
<input type='button' onclick='?'>
Using an image as a background for a button & linking bu
Moderator: General Moderators
-
Mythic Fr0st
- Forum Contributor
- Posts: 137
- Joined: Sat Dec 02, 2006 3:23 am
- Contact:
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
input{
background-image:url(../home/imgs/bg.gif);
}
</style>
</head>
<body>
<input type="button" onclick="document.location='http://www.google.com'" value="Google" />
</body>
</html>
Before You Ask
Before asking a technical question by e-mail, or in a newsgroup, or on a website chat board, do the following:
1. Try to find an answer by searching the archives of the forum you plan to post to.
2. Try to find an answer by searching the Web.
3. Try to find an answer by reading the manual.
4. Try to find an answer by reading a FAQ.
5. Try to find an answer by inspection or experimentation.
6. Try to find an answer by asking a skilled friend.
7. If you're a programmer, try to find an answer by reading the source code.
-
Mythic Fr0st
- Forum Contributor
- Posts: 137
- Joined: Sat Dec 02, 2006 3:23 am
- Contact:
hmm
I cant get it to work?
I tried URL from my local host apache server, and the name of it with it in the directory, and the location of it\name of it, and the location of it, im not sure how to get it working???
It does change the button, just it goes like a different kind of button, ( Not mine though )
hmm?
help please
I tried URL from my local host apache server, and the name of it with it in the directory, and the location of it\name of it, and the location of it, im not sure how to get it working???
It does change the button, just it goes like a different kind of button, ( Not mine though )
hmm?
Code: Select all
<style type='text/css'>
body
{
background-image:
url('SilverBG.jpg')
}
input{
background-image:url(..http://localhost/Mythic%20Aeons/BlackButton.gif);
}
</style>Re: hmm
Mythic Fr0st wrote:I cant get it to work?
I tried URL from my local host apache server, and the name of it with it in the directory, and the location of it\name of it, and the location of it, im not sure how to get it working???
It does change the button, just it goes like a different kind of button, ( Not mine though )
hmm?
help pleaseCode: Select all
<style type='text/css'> body { background-image: url('SilverBG.jpg') } input{ background-image:url(..http://localhost/Mythic%20Aeons/BlackButton.gif); } </style>
try using
Code: Select all
background-image:url(BlackButton.gif);